Class: Bananajour::Bonjour::Person
- Inherits:
-
Object
- Object
- Bananajour::Bonjour::Person
- Defined in:
- lib/bananajour/bonjour/person.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#gravatar ⇒ Object
Returns the value of attribute gravatar.
-
#name ⇒ Object
Returns the value of attribute name.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #hash ⇒ Object
-
#initialize(name, email, uri, gravatar) ⇒ Person
constructor
A new instance of Person.
- #to_hash ⇒ Object
Constructor Details
#initialize(name, email, uri, gravatar) ⇒ Person
Returns a new instance of Person.
5 6 7 |
# File 'lib/bananajour/bonjour/person.rb', line 5 def initialize(name, email, uri, gravatar) @name, @email, @uri, @gravatar = name, email, uri, gravatar end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/bananajour/bonjour/person.rb', line 3 def email @email end |
#gravatar ⇒ Object
Returns the value of attribute gravatar.
3 4 5 |
# File 'lib/bananajour/bonjour/person.rb', line 3 def gravatar @gravatar end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/bananajour/bonjour/person.rb', line 3 def name @name end |
#uri ⇒ Object
Returns the value of attribute uri.
3 4 5 |
# File 'lib/bananajour/bonjour/person.rb', line 3 def uri @uri end |
Instance Method Details
#==(other) ⇒ Object
9 10 11 |
# File 'lib/bananajour/bonjour/person.rb', line 9 def ==(other) self.uri == other.uri end |
#hash ⇒ Object
13 14 15 |
# File 'lib/bananajour/bonjour/person.rb', line 13 def hash to_hash.hash end |
#to_hash ⇒ Object
17 18 19 |
# File 'lib/bananajour/bonjour/person.rb', line 17 def to_hash {"name" => name, "email" => email, "uri" => uri, "gravatar" => gravatar} end |