Sha256: 09b1630cb34c2a48b461bf64e6fd1c170954e9863adea4dc96da99f5e926278d

Contents?: true

Size: 496 Bytes

Versions: 1

Compression:

Stored size: 496 Bytes

Contents

require 'twitter/identity'

module Twitter
  module Media
    class Photo < Twitter::Identity
      attr_reader :indices
      uri_attr_reader :display_uri, :expanded_uri, :media_uri, :media_uri_https, :uri

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

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twitter-5.0.0.rc.1 lib/twitter/media/photo.rb