Class: Vk::Schema::Namespace
- Inherits:
-
Object
- Object
- Vk::Schema::Namespace
- Defined in:
- lib/vk/schema/namespace.rb
Direct Known Subclasses
API::Account, API::Ads, API::Apps, API::Audio, API::Auth, API::Base, API::Board, API::Database, API::Docs, API::Fave, API::Friends, API::Gifts, API::Groups, API::Leads, API::Likes, API::Market, API::Messages, API::Newsfeed, API::Notes, API::Notifications, API::Oauth, API::Orders, API::Pages, API::Photos, API::Places, API::Polls, API::Search, API::Secure, API::Stats, API::Status, API::Storage, API::Users, API::Utils, API::Video, API::Wall, API::Widgets
Instance Attribute Summary collapse
- #client ⇒ Vk::Client readonly
Instance Method Summary collapse
- #call(method, args) ⇒ Vk::Schema::Response
-
#initialize(namespace, client) ⇒ Namespace
constructor
A new instance of Namespace.
Constructor Details
#initialize(namespace, client) ⇒ Namespace
Returns a new instance of Namespace.
9 10 11 12 |
# File 'lib/vk/schema/namespace.rb', line 9 def initialize(namespace, client) @namespace = namespace @client = client end |
Instance Attribute Details
#client ⇒ Vk::Client (readonly)
15 16 17 |
# File 'lib/vk/schema/namespace.rb', line 15 def client @client end |
Instance Method Details
#call(method, args) ⇒ Vk::Schema::Response
20 21 22 23 24 |
# File 'lib/vk/schema/namespace.rb', line 20 def call(method, args) method = method_classes[method].new(args) response = @client.request(method.method, method.to_hash) response_classes[method].new(response) end |