Class: YandexApiDirect::Generic

Inherits:
Hashr
  • Object
show all
Extended by:
YandexObject
Includes:
YandexObject
Defined in:
lib/yandex-api-direct/yandex_objects/generic.rb

Class Method Summary collapse

Class Method Details

.get(method_name, args = nil) ⇒ Object

get custom method response



12
13
14
15
16
17
18
19
20
21
# File 'lib/yandex-api-direct/yandex_objects/generic.rb', line 12

def self.get method_name, args = nil
  data = call_method(method_name, camelize_keys(args))[:data]
  if data.is_a?(Array)
    data.collect do |generic_data|
      new generic_data
    end
  else
    new data
  end
end