Class: Rugged::Person
- Inherits:
-
Object
- Object
- Rugged::Person
- Defined in:
- lib/rugged/person.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, email, time) ⇒ Person
constructor
A new instance of Person.
- #time ⇒ Object
- #time=(t) ⇒ Object
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
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/rugged/person.rb', line 3 def email @email end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/rugged/person.rb', line 3 def name @name end |
Instance Method Details
#time ⇒ Object
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 |