Module: Finitio::Syntax::Literal::Boolean
Constant Summary
collapse
- TRUE =
"true".freeze
- FALSE =
"false".freeze
Instance Method Summary
collapse
#to_ruby
Methods included from Node
included, #metadata, #resolve_ruby_const, #unique_names!
Instance Method Details
#value ⇒ Object
10
11
12
13
14
15
16
17
|
# File 'lib/finitio/syntax/literal/boolean.rb', line 10
def value
case to_str.strip
when TRUE then true
when FALSE then false
else
raise "Unexpected boolean literal `#{to_str}`"
end
end
|