Sha256: e3b73878a58d8e70a860a442b519da18347046a8528864b61138985488115782

Contents?: true

Size: 441 Bytes

Versions: 4

Compression:

Stored size: 441 Bytes

Contents

require "equalizer"
require "memoizable"
require "twitter/base"

module Twitter
  class Suggestion < Twitter::Base
    include Equalizer.new(:slug)
    include Memoizable

    # @return [Integer]
    attr_reader :size
    # @return [String]
    attr_reader :name, :slug

    # @return [Array<Twitter::User>]
    def users
      @attrs.fetch(:users, []).collect do |user|
        User.new(user)
      end
    end
    memoize :users
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twitter-8.1.0 lib/twitter/suggestion.rb
twitter-8.0.1 lib/twitter/suggestion.rb
twitter-8.0.0 lib/twitter/suggestion.rb
twitter-8.0.0.rc.1 lib/twitter/suggestion.rb