Class: Yuriita::Selects::Multiple
- Inherits:
-
Object
- Object
- Yuriita::Selects::Multiple
- Defined in:
- lib/yuriita/selects/multiple.rb
Instance Method Summary collapse
- #filters ⇒ Object
-
#initialize(options:, query:) ⇒ Multiple
constructor
A new instance of Multiple.
- #selected?(option) ⇒ Boolean
Constructor Details
#initialize(options:, query:) ⇒ Multiple
Returns a new instance of Multiple.
4 5 6 7 |
# File 'lib/yuriita/selects/multiple.rb', line 4 def initialize(options:, query:) @options = @query = query end |
Instance Method Details
#filters ⇒ Object
9 10 11 |
# File 'lib/yuriita/selects/multiple.rb', line 9 def filters .map(&:filter) end |
#selected?(option) ⇒ Boolean
13 14 15 |
# File 'lib/yuriita/selects/multiple.rb', line 13 def selected?(option) .include?(option) end |