Class: Looks::Gravatar::Address
- Inherits:
-
Object
- Object
- Looks::Gravatar::Address
- Includes:
- Comparable
- Defined in:
- lib/looks/gravatar/address.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
Class Method Summary collapse
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(email, image) ⇒ Address
constructor
A new instance of Address.
- #to_s ⇒ Object
Constructor Details
#initialize(email, image) ⇒ Address
Returns a new instance of Address.
17 18 19 20 |
# File 'lib/looks/gravatar/address.rb', line 17 def initialize(email, image) @email = email @image = image end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
15 16 17 |
# File 'lib/looks/gravatar/address.rb', line 15 def email @email end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
15 16 17 |
# File 'lib/looks/gravatar/address.rb', line 15 def image @image end |
Class Method Details
.new_from_addresses(key, value) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/looks/gravatar/address.rb', line 8 def self.new_from_addresses(key, value) email = key image = Image.new_from_addresses(value) new(email, image) end |
Instance Method Details
#<=>(other) ⇒ Object
22 23 24 |
# File 'lib/looks/gravatar/address.rb', line 22 def <=>(other) email <=> other.email end |
#to_s ⇒ Object
26 27 28 |
# File 'lib/looks/gravatar/address.rb', line 26 def to_s email end |