Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryotarai/peco_selector
https://github.com/ryotarai/peco_selector
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ryotarai/peco_selector
- Owner: ryotarai
- License: mit
- Created: 2015-03-10T14:35:56.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-25T03:15:40.000Z (over 9 years ago)
- Last Synced: 2024-10-06T03:49:56.186Z (3 months ago)
- Language: Ruby
- Size: 172 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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.newresult = 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