Class: Respo::Successes::Base
- Defined in:
- lib/respo/successes/base.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Attributes inherited from Response
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(record, view: nil, root: nil, label: nil) ⇒ Base
constructor
A new instance of Base.
Methods inherited from Response
Methods included from Helpers
#action_name, #camelize, pluralize, singularize
Constructor Details
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
6 7 8 |
# File 'lib/respo/successes/base.rb', line 6 def label @label end |
Instance Method Details
#call ⇒ Object
12 13 14 |
# File 'lib/respo/successes/base.rb', line 12 def call { json: data, status: status_code } end |