Module: Dozuki::Parsers::Float

Defined in:
lib/dozuki/parsers.rb

Class Method Summary collapse

Class Method Details

.parse(node) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/dozuki/parsers.rb', line 19

def self.parse(node)
  string = String.parse(node)
  begin
    Float(string)
  rescue ArgumentError
    raise InvalidFormat.new(:node => node, :value => string, :format => "float")
  end
end