Class: Vermonster::Users::User
- Inherits:
-
Hash
- Object
- Hash
- Vermonster::Users::User
- Defined in:
- lib/vermonster/users.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(options = {}) ⇒ User
Returns a new instance of User.
12 13 14 15 16 17 18 19 |
# File 'lib/vermonster/users.rb', line 12 def initialize( = {}) self.merge!() .each do |(attr, val)| instance_variable_set("@#{attr}", val) instance_eval "def #{attr}() @#{attr} end" end end |
Class Method Details
.me ⇒ Object
21 22 23 |
# File 'lib/vermonster/users.rb', line 21 def self.me User.new(Vermonster::Client.connection.get("me").body) end |