Class: Graft::Xml::Type::Integer

Inherits:
Graft::Xml::Type show all
Defined in:
lib/graft/lib/graft/xml/type.rb

Overview

Integer

Instance Method Summary collapse

Methods inherited from Graft::Xml::Type

#initialize, #value

Constructor Details

This class inherits a constructor from Graft::Xml::Type

Instance Method Details

#convertObject



60
61
62
# File 'lib/graft/lib/graft/xml/type.rb', line 60

def convert
  @source.to_i
end

#convertible?Boolean

Returns:



56
57
58
# File 'lib/graft/lib/graft/xml/type.rb', line 56

def convertible?
  !@source.match(/\d+/).nil?
end