Sha256: 65cd4688996bd2e2961d9fb2672d875258c4af640465102e950be31e6ff7e116

Contents?: true

Size: 318 Bytes

Versions: 2

Compression:

Stored size: 318 Bytes

Contents

require "social_avatar_proxy/avatar"

module SocialAvatarProxy
  class FacebookAvatar < Avatar
    def remote_url
      if identifier =~ /^[\w\-\.]+$/i
        "https://graph.facebook.com/#{identifier}/picture"
      else
        raise RuntimeError, "Identifier contains invalid characters"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
social-avatar-proxy-0.0.2 lib/social_avatar_proxy/facebook_avatar.rb
social-avatar-proxy-0.0.1 lib/social_avatar_proxy/facebook_avatar.rb