Class: Socialoud::Services::Gravatar
- Inherits:
-
Base
- Object
- Base
- Socialoud::Services::Gravatar
show all
- Defined in:
- lib/socialoud/services/gravatar.rb
Instance Attribute Summary
Attributes inherited from Base
#aggregator, #data
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #method_missing, #set
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Socialoud::Services::Base
Instance Method Details
#email ⇒ Object
10
11
12
|
# File 'lib/socialoud/services/gravatar.rb', line 10
def email
@data
end
|
#image(size = 200) ⇒ Object
14
15
16
|
# File 'lib/socialoud/services/gravatar.rb', line 14
def image(size = 200)
"http://www.gravatar.com/avatar/#{@hash}?s=#{size}"
end
|
#profile_url ⇒ Object
18
19
20
|
# File 'lib/socialoud/services/gravatar.rb', line 18
def profile_url
"http://www.gravatar.com/#{@hash}"
end
|
#setup! ⇒ Object
6
7
8
|
# File 'lib/socialoud/services/gravatar.rb', line 6
def setup!
@hash = Digest::MD5.hexdigest(@data)
end
|