Module: Stretto::Tokens::NumericToken

Defined in:
lib/stretto/grammar/tokens/value_token.rb

Overview

Represents a numeric value (either decimal or integer) parsed from a music string

Examples:

“10.5”

See Also:

Instance Method Summary collapse

Instance Method Details

#wrapValue::NumericValue

Returns A NumericValue with the parsed text as a float number.

Returns:



10
11
12
# File 'lib/stretto/grammar/tokens/value_token.rb', line 10

def wrap
  Stretto::Value::NumericValue.new(text_value.to_f)
end