Class: Yandex::Direct::Api
- Inherits:
-
Object
- Object
- Yandex::Direct::Api
- Defined in:
- lib/yandex_direct/api.rb
Instance Attribute Summary collapse
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#login ⇒ Object
readonly
Returns the value of attribute login.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token, login, app_id, locale = :en) ⇒ Api
constructor
A new instance of Api.
- #method_missing(method, param = nil) ⇒ Object
Constructor Details
#initialize(token, login, app_id, locale = :en) ⇒ Api
Returns a new instance of Api.
22 23 24 |
# File 'lib/yandex_direct/api.rb', line 22 def initialize(token, login, app_id, locale = :en) @token, @login, @app_id, @locale = token, login, app_id, locale end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, param = nil) ⇒ Object
26 27 28 |
# File 'lib/yandex_direct/api.rb', line 26 def method_missing(method, param = nil) request method.to_s.camelize, param end |
Instance Attribute Details
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
20 21 22 |
# File 'lib/yandex_direct/api.rb', line 20 def app_id @app_id end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
20 21 22 |
# File 'lib/yandex_direct/api.rb', line 20 def locale @locale end |
#login ⇒ Object (readonly)
Returns the value of attribute login.
20 21 22 |
# File 'lib/yandex_direct/api.rb', line 20 def login @login end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
20 21 22 |
# File 'lib/yandex_direct/api.rb', line 20 def token @token end |