Module: ToGravatar::HasGravatar::ClassMethods

Defined in:
lib/to_gravatar/has_gravatar.rb

Instance Method Summary collapse

Instance Method Details

#has_gravatar(options = {}) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/to_gravatar/has_gravatar.rb', line 9

def has_gravatar(options = {})
  cattr_accessor :gr_field, :gr_size, :gr_default, :gr_rating, :gr_ssl
  self.gr_field = (options[:field] || :email)
  self.gr_size = (options[:size] ||= 80)
  self.gr_default = (options[:default])
  self.gr_rating = (options[:rating] ||= "r")
  self.gr_ssl = (options[:ssl] ||= false)
end