Class: HaveAPI::ModelAdapter::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/haveapi/model_adapter.rb

Overview

Subclass this class in your adapter and reimplement necessary methods.

Class Method Summary collapse

Instance Method Summary collapse

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`.

Returns:



98
# File 'lib/haveapi/model_adapter.rb', line 98

def has_param?(name); end

#metaObject



103
104
105
# File 'lib/haveapi/model_adapter.rb', line 103

def meta
  {}
end