Sha256: 7a457bd42419c0823c6e2a0f0cb40520bfdc3eb7ac7ef212ec5b65177c832737

Contents?: true

Size: 339 Bytes

Versions: 3

Compression:

Stored size: 339 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?width=256&height=256"
      else
        raise RuntimeError, "Identifier contains invalid characters"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
social-avatar-proxy-0.0.5 lib/social_avatar_proxy/facebook_avatar.rb
social-avatar-proxy-0.0.4 lib/social_avatar_proxy/facebook_avatar.rb
social-avatar-proxy-0.0.3 lib/social_avatar_proxy/facebook_avatar.rb