Class: VK::User

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/userapi/user.rb

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ User

Returns a new instance of User.



10
11
12
# File 'lib/userapi/user.rb', line 10

def initialize(id)
  @id = id
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



14
15
16
# File 'lib/userapi/user.rb', line 14

def method_missing(method, *args)
  JSON.parse(self.class.get "/data", :query => {:act => method, :id => @id, :sid => VK::Auth.sid})
end