Class: Code::Object::Boolean
- Inherits:
-
Code::Object
- Object
- Code::Object
- Code::Object::Boolean
- Defined in:
- lib/code/object/boolean.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(raw) ⇒ Boolean
constructor
A new instance of Boolean.
- #inspect ⇒ Object
- #succ ⇒ Object
- #to_s ⇒ Object
- #truthy? ⇒ Boolean
Methods inherited from Code::Object
#<=>, #==, #call, #falsy?, #hash
Constructor Details
#initialize(raw) ⇒ Boolean
Returns a new instance of Boolean.
6 7 8 |
# File 'lib/code/object/boolean.rb', line 6 def initialize(raw) @raw = raw end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
4 5 6 |
# File 'lib/code/object/boolean.rb', line 4 def raw @raw end |
Instance Method Details
#inspect ⇒ Object
22 23 24 |
# File 'lib/code/object/boolean.rb', line 22 def inspect to_s end |
#succ ⇒ Object
14 15 16 |
# File 'lib/code/object/boolean.rb', line 14 def succ ::Code::Object::Boolean.new(!raw) end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/code/object/boolean.rb', line 18 def to_s raw.to_s end |