Class: Keisan::AST::Boolean

Inherits:
Literal show all
Defined in:
lib/keisan/ast/boolean.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bool) ⇒ Boolean

Returns a new instance of Boolean.



6
7
8
# File 'lib/keisan/ast/boolean.rb', line 6

def initialize(bool)
  @bool = bool
end

Instance Attribute Details

#boolObject (readonly)

Returns the value of attribute bool.



4
5
6
# File 'lib/keisan/ast/boolean.rb', line 4

def bool
  @bool
end

Instance Method Details

#value(context = nil) ⇒ Object



10
11
12
# File 'lib/keisan/ast/boolean.rb', line 10

def value(context = nil)
  bool
end