Class: User

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, data = {}) ⇒ User

Returns a new instance of User.



4
5
6
7
8
9
10
11
# File 'lib/lights/user.rb', line 4

def initialize( id, data = {} )
  puts data.inspect
  @id = id
  @data = data
  @name = data["name"]
  @create_date = data["create date"]
  @last_use_date = data["last use date"]
end

Instance Attribute Details

#create_dateObject (readonly)

Returns the value of attribute create_date.



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

def create_date
  @create_date
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#last_use_dateObject (readonly)

Returns the value of attribute last_use_date.



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

def last_use_date
  @last_use_date
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end