Class: Almodovar::ResourcePresenter::Serializer
- Inherits:
-
Object
- Object
- Almodovar::ResourcePresenter::Serializer
- Defined in:
- lib/almodovar-server/resource_presenter/serializer.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(resource, options = {}) ⇒ Serializer
constructor
A new instance of Serializer.
- #options_for_link ⇒ Object
Constructor Details
#initialize(resource, options = {}) ⇒ Serializer
Returns a new instance of Serializer.
7 8 9 10 |
# File 'lib/almodovar-server/resource_presenter/serializer.rb', line 7 def initialize(resource, = {}) @resource = resource @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/almodovar-server/resource_presenter/serializer.rb', line 5 def @options end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
5 6 7 |
# File 'lib/almodovar-server/resource_presenter/serializer.rb', line 5 def resource @resource end |
Instance Method Details
#options_for_link ⇒ Object
12 13 14 |
# File 'lib/almodovar-server/resource_presenter/serializer.rb', line 12 def .merge(:dont_expand => Array([:dont_expand]) << resource.url) end |