Class: Yuriita::Selects::Exclusive
- Inherits:
-
Object
- Object
- Yuriita::Selects::Exclusive
- Defined in:
- lib/yuriita/selects/exclusive.rb
Instance Method Summary collapse
- #filter ⇒ Object
-
#initialize(options:, default:, query:) ⇒ Exclusive
constructor
A new instance of Exclusive.
- #selected?(option) ⇒ Boolean
Constructor Details
#initialize(options:, default:, query:) ⇒ Exclusive
Returns a new instance of Exclusive.
4 5 6 7 8 |
# File 'lib/yuriita/selects/exclusive.rb', line 4 def initialize(options:, default:, query:) @options = @default = default @query = query end |
Instance Method Details
#filter ⇒ Object
10 11 12 |
# File 'lib/yuriita/selects/exclusive.rb', line 10 def filter active_option.filter end |
#selected?(option) ⇒ Boolean
14 15 16 |
# File 'lib/yuriita/selects/exclusive.rb', line 14 def selected?(option) active_option == option end |