Module: FlickrawObjects::Attributes
Defined Under Namespace
Modules: Boolean, ClassMethods
Constant Summary collapse
- COERCIONS =
{ String => lambda { |value| String(value) }, Boolean => lambda { |value| Integer(value) == 1 }, Integer => lambda { |value| Integer(value) }, Float => lambda { |value| Float(value) }, Time => lambda { |value| begin Time.at(Integer(value)) rescue DateTime.parse(value).to_time end } }
Instance Attribute Summary collapse
-
#init ⇒ Object
readonly
Returns the value of attribute init.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#init ⇒ Object (readonly)
Returns the value of attribute init.
61 62 63 |
# File 'lib/flickraw_objects/attributes.rb', line 61 def init @init end |
Class Method Details
.included(base) ⇒ Object
4 5 6 |
# File 'lib/flickraw_objects/attributes.rb', line 4 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#initialize(response) ⇒ Object
63 64 65 |
# File 'lib/flickraw_objects/attributes.rb', line 63 def initialize(response) @init = response end |