Class: Rugged::Person

Inherits:
Object
  • Object
show all
Defined in:
lib/rugged/person.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, email, time) ⇒ Person

Returns a new instance of Person.



5
6
7
8
9
# File 'lib/rugged/person.rb', line 5

def initialize(name, email, time)
	@name = name
	@email = email
	@time = time.to_i
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



3
4
5
# File 'lib/rugged/person.rb', line 3

def email
  @email
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/rugged/person.rb', line 3

def name
  @name
end

Instance Method Details

#timeObject



11
12
13
# File 'lib/rugged/person.rb', line 11

def time
	Time.at(@time)
end

#time=(t) ⇒ Object



15
16
17
# File 'lib/rugged/person.rb', line 15

def time=(t)
	@time = t.to_i
end