Class: NsOptions::Boolean
- Inherits:
-
Object
- Object
- NsOptions::Boolean
- Defined in:
- lib/ns-options/boolean.rb
Instance Attribute Summary collapse
-
#actual ⇒ Object
Returns the value of attribute actual.
Instance Method Summary collapse
- #==(other_boolean) ⇒ Object
-
#initialize(value) ⇒ Boolean
constructor
A new instance of Boolean.
- #returned_value ⇒ Object
Constructor Details
#initialize(value) ⇒ Boolean
Returns a new instance of Boolean.
6 7 8 |
# File 'lib/ns-options/boolean.rb', line 6 def initialize(value) self.actual = value end |
Instance Attribute Details
#actual ⇒ Object
Returns the value of attribute actual.
4 5 6 |
# File 'lib/ns-options/boolean.rb', line 4 def actual @actual end |
Instance Method Details
#==(other_boolean) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/ns-options/boolean.rb', line 14 def ==(other_boolean) if other_boolean.kind_of?(Boolean) self.actual == other_boolean.actual else self.actual == other_boolean end end |
#returned_value ⇒ Object
22 23 24 |
# File 'lib/ns-options/boolean.rb', line 22 def returned_value self.actual end |