Class: GMO::PG::Payload::TypecastableInteger
- Inherits:
-
TypecastableValue
- Object
- TypecastableValue
- GMO::PG::Payload::TypecastableInteger
- Defined in:
- lib/gmo-pg/http_resource/payload/typecast.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from TypecastableValue
Instance Method Summary collapse
Methods inherited from TypecastableValue
Constructor Details
This class inherits a constructor from GMO::PG::Payload::TypecastableValue
Instance Method Details
#to_attribute ⇒ Object
51 52 53 |
# File 'lib/gmo-pg/http_resource/payload/typecast.rb', line 51 def to_attribute @value.respond_to?(:to_i) ? @value.to_i : @value end |
#to_payload ⇒ Object
55 56 57 |
# File 'lib/gmo-pg/http_resource/payload/typecast.rb', line 55 def to_payload to_attribute.to_s end |