Class: Ptolemy::TOML::BooleanLiteral

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/ptolemy/nodes.rb

Overview

Represents a Boolean

Instance Method Summary collapse

Instance Method Details

#to_valuetrue, false

Evaluate a boolean by checking whether its text value matches true

Returns:

  • (true, false)

    evaluated boolean



153
154
155
# File 'lib/ptolemy/nodes.rb', line 153

def to_value
  text_value == 'true'
end