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.



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.

Returns:



105
106
107
# File 'lib/haveapi/model_adapter.rb', line 105

def has_param?(name)

end

#metaObject



114
115
116
# File 'lib/haveapi/model_adapter.rb', line 114

def meta
  {}
end