Sha256: ec43d7569134871c611ec2a90ec140b8c94c7403b4f77c561aed3251ee9416fc

Contents?: true

Size: 337 Bytes

Versions: 10

Compression:

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
social-avatar-proxy-2.0.1 lib/social_avatar_proxy/facebook_avatar.rb
social-avatar-proxy-2.0.0 lib/social_avatar_proxy/facebook_avatar.rb
social-avatar-proxy-1.2.0 lib/social_avatar_proxy/facebook_avatar.rb
social-avatar-proxy-1.1.0 lib/social_avatar_proxy/facebook_avatar.rb
social-avatar-proxy-1.0.1 lib/social_avatar_proxy/facebook_avatar.rb
social-avatar-proxy-1.0.0 lib/social_avatar_proxy/facebook_avatar.rb
social-avatar-proxy-0.0.9 lib/social_avatar_proxy/facebook_avatar.rb
social-avatar-proxy-0.0.8 lib/social_avatar_proxy/facebook_avatar.rb
social-avatar-proxy-0.0.7 lib/social_avatar_proxy/facebook_avatar.rb
social-avatar-proxy-0.0.6 lib/social_avatar_proxy/facebook_avatar.rb