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.



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

def initialize(value)
  self.actual = value
end

Instance Attribute Details

#actualObject

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_valueObject



22
23
24
# File 'lib/ns-options/boolean.rb', line 22

def returned_value
  self.actual
end