Sha256: bc6484034d0ae1d2d2f71099798e1a4ca3a8ba27d14ff6d67c5397a4129b13e1

Contents?: true

Size: 550 Bytes

Versions: 7

Compression:

Stored size: 550 Bytes

Contents

require 'twitter/base'
require 'twitter/size'

module Twitter
  class Configuration < Twitter::Base
    attr_reader :characters_reserved_per_media, :max_media_per_upload,
      :non_username_paths, :photo_size_limit, :short_url_length, :short_url_length_https

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

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
twitter-4.4.0 lib/twitter/configuration.rb
twitter-4.3.0 lib/twitter/configuration.rb
twitter-4.2.0 lib/twitter/configuration.rb
twitter-4.1.2 lib/twitter/configuration.rb
twitter-4.1.1 lib/twitter/configuration.rb
twitter-4.1.0 lib/twitter/configuration.rb
twitter-4.0.0 lib/twitter/configuration.rb