Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ryotarai/peco_selector


https://github.com/ryotarai/peco_selector

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# PecoSelector

Select objects with peco.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'peco_selector'
```

And then execute:

$ bundle

## Usage

```ruby
bob = Object.new
alice = Object.new

result = PecoSelector.select_from(bob: bob, alice: alice)
# or
result = PecoSelector.select_from([['bob', bob], ['alice', alice]])

result # => [bob]
```

```ruby
result = PecoSelector.select_from(['bob', 'alice'])

result # => ['bob']
```

## Contributing

1. Fork it ( https://github.com/[my-github-username]/peco_selector/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request