Class: Dobedobedo::User

Inherits:
Object
  • Object
show all
Includes:
ObjToJson
Defined in:
lib/dobedobedo/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ObjToJson

#objToJson, #obj_to_json, #obj_to_json2

Constructor Details

#initialize(token, workspace_id, h) ⇒ User

Returns a new instance of User.



7
8
9
10
11
12
13
14
# File 'lib/dobedobedo/user.rb', line 7

def initialize(token, workspace_id, h)
  @token = token
  @workspace_id = workspace_id
  h.each do |k,v|
    User.send(:attr_accessor, k.to_sym)
    self.send("#{k}=".to_sym, v)
  end
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



5
6
7
# File 'lib/dobedobedo/user.rb', line 5

def token
  @token
end