Sha256: 213464defb9555be165ded24539aef456c06f984a36502c81d6f36c0ff23bf75

Contents?: true

Size: 337 Bytes

Versions: 7

Compression:

Stored size: 337 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]).reduce({}) do |object, (key, value)|
        object[key] = Size.new(value)
        object
      end
    end
    memoize :sizes
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
twitter-5.5.1 lib/twitter/profile_banner.rb
twitter-5.5.0 lib/twitter/profile_banner.rb
twitter-5.4.1 lib/twitter/profile_banner.rb
twitter-5.4.0 lib/twitter/profile_banner.rb
twitter-5.3.1 lib/twitter/profile_banner.rb
twitter-5.3.0 lib/twitter/profile_banner.rb
twitter-5.2.0 lib/twitter/profile_banner.rb