Class: LcApi::Base

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/lc_api/base.rb

Direct Known Subclasses

Location, Message, Series

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_keyObject

Returns the value of attribute api_key.



6
7
8
# File 'lib/lc_api/base.rb', line 6

def api_key
  @api_key
end

Class Method Details

.find(*args) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/lc_api/base.rb', line 9

def self.find(*args)
  scope   = args.slice!(0)
  options = args.slice!(0) || {}

  options[:params] = (options[:params] || {}).merge({include: options[:include].join(",")}) if options.has_key? :include
  options[:params] = (options[:params] || {}).merge({type: options[:type]}) if options.has_key? :type
  options[:params] = (options[:params] || {}).merge({key: LcApi.key})

  super(scope, options)
end