module SocialAvatarProxy::PathHelpers
Public Instance Methods
avatar_base_path()
click to toggle source
# File lib/social_avatar_proxy/path_helpers.rb, line 3 def avatar_base_path @avatar_base_path ||= "" end
avatar_base_path=(path)
click to toggle source
# File lib/social_avatar_proxy/path_helpers.rb, line 7 def avatar_base_path=(path) # strip leading / trailing slashes path = path.gsub(/^\/|\/$/, "") if path.empty? # reset to an empty string @avatar_base_path = "" else # set with prepended slash @avatar_base_path = "/#{path}" end end
facebook_avatar_path(identifier)
click to toggle source
# File lib/social_avatar_proxy/path_helpers.rb, line 23 def facebook_avatar_path(identifier) File.join(avatar_base_path, "facebook", identifier.to_s) end
twitter_avatar_path(identifier)
click to toggle source
# File lib/social_avatar_proxy/path_helpers.rb, line 19 def twitter_avatar_path(identifier) File.join(avatar_base_path, "twitter", identifier.to_s) end