Class: Twitter::ProfileBanner

Inherits:
Base
  • Object
show all
Includes:
Memoizable
Defined in:
lib/twitter/profile_banner.rb

Overview

Represents a user's profile banner

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_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 Method Details

#sizesHash{Symbol => Twitter::Size}

Returns a hash of banner sizes

Examples:

profile_banner.sizes

Returns:



15
16
17
18
19
20
# File 'lib/twitter/profile_banner.rb', line 15

def sizes
  result = {} # : Hash[Symbol, Size]
  @attrs.fetch(:sizes, []).each_with_object(result) do |(key, value), object|
    object[key] = Size.new(value)
  end
end