twitter-status-bot/.gems/gems/twitter-5.11.0/lib/twitter/profile_banner.rb

17 lines
340 B
Ruby
Raw Normal View History

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