Module: LetterAvatar::HasAvatar::InstanceMethods

Defined in:
lib/letter_avatar/has_avatar.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



12
13
14
# File 'lib/letter_avatar/has_avatar.rb', line 12

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#avatar_path(size = 200) ⇒ Object



16
17
18
# File 'lib/letter_avatar/has_avatar.rb', line 16

def avatar_path(size = 200)
  LetterAvatar.generate(name, size)
end

#avatar_url(size = 200) ⇒ Object



20
21
22
# File 'lib/letter_avatar/has_avatar.rb', line 20

def avatar_url(size = 200)
  avatar_path(size).gsub(/public/, '')
end