Class: Polar::User

Inherits:
Base
  • Object
show all
Defined in:
lib/polar/user.rb

Instance Method Summary collapse

Methods inherited from Base

#method_missing

Constructor Details

#initialize(data) ⇒ User

Returns a new instance of User.



3
4
5
# File 'lib/polar/user.rb', line 3

def initialize(data)
  super(data)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Polar::Base

Instance Method Details

#avatarObject



7
8
9
# File 'lib/polar/user.rb', line 7

def avatar
  tinyurl
end

#to_hObject



11
12
13
# File 'lib/polar/user.rb', line 11

def to_h
  @data.merge({ "avatar" => @data["tinyurl"]})
end