Module: VeGravatarImageTag
- Defined in:
- lib/ve_gravatar_image_tag.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Classes: Configuration
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
4
5
6
|
# File 'lib/ve_gravatar_image_tag.rb', line 4
def configuration
@configuration
end
|
Class Method Details
11
12
13
|
# File 'lib/ve_gravatar_image_tag.rb', line 11
def self.configure
yield(configuration)
end
|
.gravatar_url(email, overrides = {}) ⇒ Object
84
85
86
87
88
89
90
|
# File 'lib/ve_gravatar_image_tag.rb', line 84
def self.gravatar_url(email, overrides = {})
gravatar_params = gravatar_options(overrides || {})
url_base = gravatar_url_base(gravatar_params.delete(:secure))
hash = gravatar_id(email, gravatar_params.delete(:filetype))
url_params = url_params(gravatar_params)
"#{url_base}/#{hash}#{url_params}"
end
|
.included(base) ⇒ Object
24
25
26
27
28
|
# File 'lib/ve_gravatar_image_tag.rb', line 24
def self.included(base)
VeGravatarImageTag.configure { |c| nil }
base.extend ClassMethods
base.send :include, InstanceMethods
end
|