Class: OBIX::Types::Integer

Inherits:
Type
  • Object
show all
Defined in:
lib/obix/types/integer.rb

Instance Method Summary collapse

Methods inherited from Type

#initialize

Constructor Details

This class inherits a constructor from OBIX::Types::Type

Instance Method Details

#cast(value) ⇒ Object

Cast the given value to an integer.

value - Any object that responds to ‘to_i`.

Returns an integer.



11
12
13
# File 'lib/obix/types/integer.rb', line 11

def cast value
  value.to_i
end