Class: Twitter::Configuration

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

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Base

#[], #attr_equal, attr_reader, #attrs, #attrs_equal, fetch, fetch_or_new, from_response, identity_map, #initialize, store, #update

Constructor Details

This class inherits a constructor from Twitter::Base

Instance Attribute Details

- (Object) characters_reserved_per_media (readonly)

Returns the value of attribute characters_reserved_per_media



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

def characters_reserved_per_media
  @characters_reserved_per_media
end

- (Object) max_media_per_upload (readonly)

Returns the value of attribute max_media_per_upload



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

def max_media_per_upload
  @max_media_per_upload
end

- (Object) non_username_paths (readonly)

Returns the value of attribute non_username_paths



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

def non_username_paths
  @non_username_paths
end

- (Object) photo_size_limit (readonly)

Returns the value of attribute photo_size_limit



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

def photo_size_limit
  @photo_size_limit
end

- (Object) short_url_length (readonly)

Returns the value of attribute short_url_length



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

def short_url_length
  @short_url_length
end

- (Object) short_url_length_https (readonly)

Returns the value of attribute short_url_length_https



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

def short_url_length_https
  @short_url_length_https
end

Instance Method Details

- (Array<Twitter::Size>) photo_sizes

Returns an array of photo sizes

Returns:



11
12
13
14
15
16
# File 'lib/twitter/configuration.rb', line 11

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