Class: Vkontakte::Api::Base
- Inherits:
-
Object
- Object
- Vkontakte::Api::Base
- Defined in:
- lib/vkontakte/api/base.rb
Direct Known Subclasses
Friends::Standart, Groups::Standart, Likes::Standart, Photos::Standart, Profile::Standart, Secure::Standart, Wall::Standart
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#default_params ⇒ Object
Returns the value of attribute default_params.
Instance Method Summary collapse
- #call(method_name, params = {}) ⇒ Object
-
#initialize(base) ⇒ Base
constructor
A new instance of Base.
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
#app ⇒ Object
Returns the value of attribute app.
4 5 6 |
# File 'lib/vkontakte/api/base.rb', line 4 def app @app end |
#default_params ⇒ Object
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 |