Class: SmartVkApi::VK

Inherits:
Object
  • Object
show all
Includes:
Call, Methods
Defined in:
lib/smart_vk_api.rb

Instance Method Summary collapse

Methods included from Methods

#method_missing, #respond_to?

Methods included from Call

#call, #http, #method_url

Constructor Details

#initialize(configuration = nil) ⇒ VK

Returns a new instance of VK.



16
17
18
# File 'lib/smart_vk_api.rb', line 16

def initialize(configuration = nil)
  @configuration = configuration
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class SmartVkApi::Methods

Instance Method Details

#access_tokenObject



24
25
26
# File 'lib/smart_vk_api.rb', line 24

def access_token
  configuration.access_token unless configuration.nil?
end

#app_idObject



28
29
30
# File 'lib/smart_vk_api.rb', line 28

def app_id
  configuration.app_id unless configuration.nil?
end

#app_tokenObject



32
33
34
# File 'lib/smart_vk_api.rb', line 32

def app_token
  configuration.app_token unless configuration.nil?
end

#configurationObject



20
21
22
# File 'lib/smart_vk_api.rb', line 20

def configuration
  @configuration || SmartVkApi.configuration
end