17 lines
340 B
Ruby
17 lines
340 B
Ruby
require 'twitter/base'
|
|
|
|
module Twitter
|
|
class ProfileBanner < Twitter::Base
|
|
# Returns an array of photo sizes
|
|
#
|
|
# @return [Array<Twitter::Size>]
|
|
def sizes
|
|
@attrs.fetch(:sizes, []).inject({}) do |object, (key, value)|
|
|
object[key] = Size.new(value)
|
|
object
|
|
end
|
|
end
|
|
memoize :sizes
|
|
end
|
|
end
|