Class: Yuriita::Option
- Inherits:
-
Object
- Object
- Yuriita::Option
- Defined in:
- lib/yuriita/option.rb
Instance Attribute Summary collapse
-
#filter ⇒ Object
readonly
Returns the value of attribute filter.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
-
#initialize(name:, filter:) ⇒ Option
constructor
A new instance of Option.
- #input ⇒ Object
Constructor Details
#initialize(name:, filter:) ⇒ Option
Returns a new instance of Option.
5 6 7 8 |
# File 'lib/yuriita/option.rb', line 5 def initialize(name:, filter:) @name = name @filter = filter end |
Instance Attribute Details
#filter ⇒ Object (readonly)
Returns the value of attribute filter.
3 4 5 |
# File 'lib/yuriita/option.rb', line 3 def filter @filter end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/yuriita/option.rb', line 3 def name @name end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
14 15 16 |
# File 'lib/yuriita/option.rb', line 14 def ==(other) other.is_a?(self.class) && other.name == name end |
#input ⇒ Object
10 11 12 |
# File 'lib/yuriita/option.rb', line 10 def input filter.input end |