class HaveAPI::ModelAdapter::Input

Subclass this class in your adapter and reimplement necessary methods.

Public Class Methods

clean(model, raw, extra) click to toggle source

Return model instance from a raw input resource parameter.

# File lib/haveapi/model_adapter.rb, line 83
def self.clean(model, raw, extra); end
new(input) click to toggle source
# File lib/haveapi/model_adapter.rb, line 67
def initialize(input)
  @input = input
end
used_by(action) click to toggle source
# File lib/haveapi/model_adapter.rb, line 65
def self.used_by(action); end

Public Instance Methods

[](name) click to toggle source

Return parameter with ‘name`.

# File lib/haveapi/model_adapter.rb, line 78
def [](name)
  @input[name]
end
has_param?(name) click to toggle source

Return true if input parameters contain parameter with ‘name`.

# File lib/haveapi/model_adapter.rb, line 73
def has_param?(name)
  @input.has_key?(name)
end