Module: Decoradar::InstanceMethods
- Defined in:
- lib/decoradar.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
69 70 71 |
# File 'lib/decoradar.rb', line 69 def model @model end |
Instance Method Details
#as_json(_options = nil) ⇒ Object
75 76 77 78 79 |
# File 'lib/decoradar.rb', line 75 def as_json( = nil) self.class.attribute_set.reduce({}) do |json, attribute| enrich_json(json, attribute) end end |
#initialize(model) ⇒ Object
71 72 73 |
# File 'lib/decoradar.rb', line 71 def initialize(model) @model = model end |