Class: FilterParam::AST::Literals::Boolean

Inherits:
FilterParam::AST::Literal show all
Defined in:
lib/filter_param/ast/literals/boolean.rb

Constant Summary collapse

TRUE =
new("true")
FALSE =
new("false")

Instance Attribute Summary

Attributes inherited from FilterParam::AST::Literal

#value

Instance Method Summary collapse

Methods inherited from FilterParam::AST::Literal

#type_cast

Methods inherited from Node

#accept

Constructor Details

#initialize(value) ⇒ Boolean

Returns a new instance of Boolean.



5
6
7
# File 'lib/filter_param/ast/literals/boolean.rb', line 5

def initialize(value)
  @value = (value.to_s == "true")
end

Instance Method Details

#data_typeObject



9
10
11
# File 'lib/filter_param/ast/literals/boolean.rb', line 9

def data_type
  :boolean
end