lib/vkontakte/api/base.rb in vkontakte-0.0.1 vs lib/vkontakte/api/base.rb in vkontakte-0.0.2
- old
+ new
@@ -1,13 +1,22 @@
module Vkontakte
module Api
class Base
- attr_accessor :app
+ attr_accessor :app, :default_params
delegate :call, :to => :app
def initialize(base)
@app = base
+ end
+
+ def default_params
+ @default_params ||= {}
+ end
+
+ def call(method_name, params = {})
+ params = default_params.merge(params)
+ @app.call(method_name, params)
end
end
end
end