Module: Dozuki::Parsers::Integer

Defined in:
lib/dozuki/parsers.rb

Class Method Summary collapse

Class Method Details

.parse(node) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/dozuki/parsers.rb', line 9

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