Class: Yuriita::Option

Inherits:
Object
  • Object
show all
Defined in:
lib/yuriita/option.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#filterObject (readonly)

Returns the value of attribute filter.



3
4
5
# File 'lib/yuriita/option.rb', line 3

def filter
  @filter
end

#nameObject (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

#inputObject



10
11
12
# File 'lib/yuriita/option.rb', line 10

def input
  filter.input
end