Class: NsOptions::Boolean

Inherits:
Object
  • Object
show all
Defined in:
lib/ns-options/boolean.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Boolean

Returns a new instance of Boolean.



8
9
10
# File 'lib/ns-options/boolean.rb', line 8

def initialize(value)
  self.actual = value
end

Instance Attribute Details

#actualObject

Returns the value of attribute actual.



6
7
8
# File 'lib/ns-options/boolean.rb', line 6

def actual
  @actual
end

Instance Method Details

#==(other_boolean) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/ns-options/boolean.rb', line 16

def ==(other_boolean)
  if other_boolean.kind_of?(Boolean)
    self.actual == other_boolean.actual
  else
    self.actual == other_boolean
  end
end

#returned_valueObject



24
25
26
# File 'lib/ns-options/boolean.rb', line 24

def returned_value
  self.actual
end