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

18 lines
334 B
Ruby
Raw Normal View History

require 'equalizer'
require 'twitter/base'
module Twitter
class Suggestion < Twitter::Base
include Equalizer.new(:slug)
attr_reader :name, :size, :slug
# @return [Array<Twitter::User>]
def users
@attrs.fetch(:users, []).collect do |user|
User.new(user)
end
end
memoize :users
end
end