Parent

Included Modules

Class/Module Index [+]

Quicksearch

ClsRuby::FloatingPointScalarParser

Класс парсера вещественных чисел.

Public Instance Methods

format( what ) click to toggle source
# File lib/cls-ruby/basic_scalars.rb, line 196
def format( what )
  what.to_s
end
on_tok_nonspace( token ) click to toggle source
# File lib/cls-ruby/basic_scalars.rb, line 186
def on_tok_nonspace( token )
  case token
    when /^([+-]?[[:digit:]]*[\.]?[[:digit:]]*([Ee][+-]?[[:digit:]]+)?)$/ 
      token.to_f
    else
      raise InvalidValueEx.new(
          "value '#{token}' is not a floating point number" )
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.