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.
98 99 100 101 |
# File 'lib/haveapi/model_adapter.rb', line 98 def initialize(context, obj) @context = context @object = obj end |
Class Method Details
.used_by(action) ⇒ Object
94 95 96 |
# File 'lib/haveapi/model_adapter.rb', line 94 def self.used_by(action) end |
Instance Method Details
#[](name) ⇒ Object
Return a parameter in an appropriate format to be sent to a client.
110 111 112 |
# File 'lib/haveapi/model_adapter.rb', line 110 def [](name) end |
#has_param?(name) ⇒ Boolean
Return true if input parameters contain parameter with name.
105 106 107 |
# File 'lib/haveapi/model_adapter.rb', line 105 def has_param?(name) end |
#meta ⇒ Object
114 115 116 |
# File 'lib/haveapi/model_adapter.rb', line 114 def {} end |