Class: Ptolemy::TOML::FloatLiteral

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

Overview

Represents a Float

Instance Method Summary collapse

Instance Method Details

#to_valueFloat

Evaluate a float by converting the text_value to a float directly

Returns:

  • (Float)

    evaluated float



141
142
143
# File 'lib/ptolemy/nodes.rb', line 141

def to_value
  text_value.to_f
end