Module: VkontakteApi::Resolvable
Overview
A mixin for classes that will be resolved via #method_missing
.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ Object
Creates a resolvable object keeping it's name and the object that resolved it.
-
#token ⇒ String
Returns the token from the previous resolver.
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/vkontakte_api/resolvable.rb', line 4 def name @name end |
Instance Method Details
#initialize(name, options = {}) ⇒ Object
Creates a resolvable object keeping it's name and the object that resolved it.
9 10 11 12 |
# File 'lib/vkontakte_api/resolvable.rb', line 9 def initialize(name, = {}) @name = name.to_s @previous_resolver = .delete(:resolver) end |
#token ⇒ String
Returns the token from the previous resolver.
16 17 18 |
# File 'lib/vkontakte_api/resolvable.rb', line 16 def token @previous_resolver.token end |