Module: FootballApi::Requestable::ClassMethods

Defined in:
lib/football_api/mixins/requestable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionObject

Returns the value of attribute action.



8
9
10
# File 'lib/football_api/mixins/requestable.rb', line 8

def action
  @action
end

#json_idObject

Returns the value of attribute json_id.



8
9
10
# File 'lib/football_api/mixins/requestable.rb', line 8

def json_id
  @json_id
end

#params_methodObject

Returns the value of attribute params_method.



8
9
10
# File 'lib/football_api/mixins/requestable.rb', line 8

def params_method
  @params_method
end

Instance Method Details

#api_options(options = {}) ⇒ Object

Options can be any of the class attributes



12
13
14
15
16
# File 'lib/football_api/mixins/requestable.rb', line 12

def api_options(options = {})
  self.action  = options.delete(:action).to_s if options[:action]
  self.json_id = options.delete(:json_key) if options[:json_key]
  self.params_method = options.delete(:action_params)
end