Class: HaveAPI::ModelAdapter::Output
- Inherits:
-
Object
- Object
- HaveAPI::ModelAdapter::Output
- Defined in:
- lib/haveapi/model_adapter.rb
Overview
Subclass this class in your adapter and reimplement necessary methods.
Direct Known Subclasses
HaveAPI::ModelAdapters::ActiveRecord::Output, HaveAPI::ModelAdapters::Hash::Output
Class Method Summary collapse
Instance Method Summary collapse
-
#[](name) ⇒ Object
Return a parameter in an appropriate format to be sent to a client.
-
#has_param?(name) ⇒ Boolean
Return true if input parameters contain parameter with ‘name`.
-
#initialize(context, obj) ⇒ Output
constructor
A new instance of Output.
- #meta ⇒ Object
Constructor Details
#initialize(context, obj) ⇒ Output
Returns a new instance of Output.
91 92 93 94 |
# File 'lib/haveapi/model_adapter.rb', line 91 def initialize(context, obj) @context = context @object = obj end |
Class Method Details
.used_by(action) ⇒ Object
89 |
# File 'lib/haveapi/model_adapter.rb', line 89 def self.used_by(action); end |
Instance Method Details
#[](name) ⇒ Object
Return a parameter in an appropriate format to be sent to a client.
101 |
# File 'lib/haveapi/model_adapter.rb', line 101 def [](name); end |
#has_param?(name) ⇒ Boolean
Return true if input parameters contain parameter with ‘name`.
98 |
# File 'lib/haveapi/model_adapter.rb', line 98 def has_param?(name); end |
#meta ⇒ Object
103 104 105 |
# File 'lib/haveapi/model_adapter.rb', line 103 def {} end |