Class: Vkontakte::Api::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/vkontakte/api/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base) ⇒ Base

Returns a new instance of Base.



8
9
10
# File 'lib/vkontakte/api/base.rb', line 8

def initialize(base)
  @app = base
end

Instance Attribute Details

#appObject

Returns the value of attribute app.



4
5
6
# File 'lib/vkontakte/api/base.rb', line 4

def app
  @app
end

#default_paramsObject

Returns the value of attribute default_params.



4
5
6
# File 'lib/vkontakte/api/base.rb', line 4

def default_params
  @default_params
end

Instance Method Details

#call(method_name, params = {}) ⇒ Object



16
17
18
19
# File 'lib/vkontakte/api/base.rb', line 16

def call(method_name, params = {})
  params = default_params.merge(params)
  @app.call(method_name, params)['response']
end