Class: Api::ResponseBuilder::Base
- Inherits:
-
Object
- Object
- Api::ResponseBuilder::Base
- Defined in:
- lib/api/response_builder/base.rb
Overview
Base Class for building api response
Direct Known Subclasses
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#resource ⇒ Object
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(resource, config = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(resource, config = {}) ⇒ Base
Returns a new instance of Base.
9 10 11 12 |
# File 'lib/api/response_builder/base.rb', line 9 def initialize(resource, config = {}) @resource = resource @config = config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
6 7 8 |
# File 'lib/api/response_builder/base.rb', line 6 def config @config end |
#resource ⇒ Object
Returns the value of attribute resource.
6 7 8 |
# File 'lib/api/response_builder/base.rb', line 6 def resource @resource end |