Sha256: 48c6b4787ce8bc05cab2a7be73ec953fc8e9c2250a6ff91d01364304303da1a1

Contents?: true

Size: 339 Bytes

Versions: 4

Compression:

Stored size: 339 Bytes

Contents

require 'twitter/base'

module Twitter
  class ProfileBanner < Twitter::Base

    # Returns an array of photo sizes
    #
    # @return [Array<Twitter::Size>]
    def sizes
      Array(@attrs[:sizes]).inject({}) do |object, (key, value)|
        object[key] = Size.new(value)
        object
      end
    end
    memoize :sizes

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twitter-5.1.1 lib/twitter/profile_banner.rb
twitter-5.1.0 lib/twitter/profile_banner.rb
twitter-5.0.1 lib/twitter/profile_banner.rb
twitter-5.0.0 lib/twitter/profile_banner.rb