Class: Twitter::Configuration

Inherits:
Base
  • Object
show all
Defined in:
lib/twitter/configuration.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, deprecate_attribute_method, display_uri_attr_reader, #initialize, object_attr_reader, predicate_attr_reader, uri_attr_reader

Methods included from Utils

flat_pmap, pmap

Constructor Details

This class inherits a constructor from Twitter::Base

Instance Attribute Details

#characters_reserved_per_mediaInteger (readonly)

Returns:

  • (Integer)


8
9
10
# File 'lib/twitter/configuration.rb', line 8

def characters_reserved_per_media
  @characters_reserved_per_media
end

#max_media_per_uploadInteger (readonly)

Returns:

  • (Integer)


8
9
10
# File 'lib/twitter/configuration.rb', line 8

def max_media_per_upload
  @max_media_per_upload
end

#non_username_pathsArray<String> (readonly)

Returns:

  • (Array<String>)


6
7
8
# File 'lib/twitter/configuration.rb', line 6

def non_username_paths
  @non_username_paths
end

#photo_size_limitInteger (readonly)

Returns:

  • (Integer)


8
9
10
# File 'lib/twitter/configuration.rb', line 8

def photo_size_limit
  @photo_size_limit
end

#short_url_lengthInteger (readonly) Also known as: short_uri_length

Returns:

  • (Integer)


8
9
10
# File 'lib/twitter/configuration.rb', line 8

def short_url_length
  @short_url_length
end

#short_url_length_httpsInteger (readonly) Also known as: short_uri_length_https

Returns:

  • (Integer)


8
9
10
# File 'lib/twitter/configuration.rb', line 8

def short_url_length_https
  @short_url_length_https
end

Instance Method Details

#photo_sizesArray<Twitter::Size>

Returns an array of photo sizes

Returns:



16
17
18
19
20
21
# File 'lib/twitter/configuration.rb', line 16

def photo_sizes
  @attrs.fetch(:photo_sizes, []).inject({}) do |object, (key, value)|
    object[key] = Size.new(value)
    object
  end
end