Class: AdequateSerialization::Decorator::Attachments
- Inherits:
-
Object
- Object
- AdequateSerialization::Decorator::Attachments
- Defined in:
- lib/adequate_serialization/decorator.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Object
readonly
Returns the value of attribute attachments.
Instance Method Summary collapse
- #decorate(result) ⇒ Object
-
#initialize(attachments) ⇒ Attachments
constructor
A new instance of Attachments.
Constructor Details
#initialize(attachments) ⇒ Attachments
Returns a new instance of Attachments.
14 15 16 |
# File 'lib/adequate_serialization/decorator.rb', line 14 def initialize() @attachments = end |
Instance Attribute Details
#attachments ⇒ Object (readonly)
Returns the value of attribute attachments.
12 13 14 |
# File 'lib/adequate_serialization/decorator.rb', line 12 def @attachments end |
Instance Method Details
#decorate(result) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/adequate_serialization/decorator.rb', line 18 def decorate(result) .each do |name, | result[name] = [result[:id]] end result end |