Class: SmartVkApi::Methods::Proxy
- Inherits:
-
Object
- Object
- SmartVkApi::Methods::Proxy
- Defined in:
- lib/smart_vk_api/methods.rb
Instance Attribute Summary collapse
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#vk ⇒ Object
Returns the value of attribute vk.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(vk, scope) ⇒ Proxy
constructor
A new instance of Proxy.
- #method_missing(method_name, *arguments, &block) ⇒ Object
- #respond_to?(method_name, include_private = false) ⇒ Boolean
Constructor Details
#initialize(vk, scope) ⇒ Proxy
Returns a new instance of Proxy.
21 22 23 24 |
# File 'lib/smart_vk_api/methods.rb', line 21 def initialize(vk, scope) self.vk = vk self.scope = scope end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Attribute Details
#scope ⇒ Object
Returns the value of attribute scope.
13 14 15 |
# File 'lib/smart_vk_api/methods.rb', line 13 def scope @scope end |
#vk ⇒ Object
Returns the value of attribute vk.
12 13 14 |
# File 'lib/smart_vk_api/methods.rb', line 12 def vk @vk end |
Class Method Details
.camelcase(method_name) ⇒ Object
15 16 17 18 19 |
# File 'lib/smart_vk_api/methods.rb', line 15 def self.camelcase(method_name) result = method_name.to_s.split('_').map(&:capitalize).join result[0] = result[0].downcase result end |
Instance Method Details
#respond_to?(method_name, include_private = false) ⇒ Boolean
31 32 33 |
# File 'lib/smart_vk_api/methods.rb', line 31 def respond_to?(method_name, include_private = false) true # we should respond to any method using Proxy end |