Class: Api::ResponseBuilder::StatusCode
- Defined in:
- lib/api/response_builder/status_code.rb
Overview
Class which helps in building status code of api response
Instance Attribute Summary collapse
-
#resource ⇒ Object
Returns the value of attribute resource.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(resource, config = {}) ⇒ StatusCode
constructor
A new instance of StatusCode.
Constructor Details
#initialize(resource, config = {}) ⇒ StatusCode
Returns a new instance of StatusCode.
9 10 11 12 13 14 |
# File 'lib/api/response_builder/status_code.rb', line 9 def initialize(resource, config = {}) super(resource, config) @resource = resource @status_code = :ok set_status_code end |
Instance Attribute Details
#resource ⇒ Object
Returns the value of attribute resource.
6 7 8 |
# File 'lib/api/response_builder/status_code.rb', line 6 def resource @resource end |
#status_code ⇒ Object
Returns the value of attribute status_code.
6 7 8 |
# File 'lib/api/response_builder/status_code.rb', line 6 def status_code @status_code end |