Sha256: ff2d92b0944728982037a5e520926fd3bc989197dd32696388d6759ec9336eb8

Contents?: true

Size: 396 Bytes

Versions: 3

Compression:

Stored size: 396 Bytes

Contents

require 'equalizer'
require 'twitter/base'

module Twitter
  class Suggestion < Twitter::Base
    include Equalizer.new(:slug)
    # @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

3 entries across 3 versions & 1 rubygems

Version Path
twitter-5.14.0 lib/twitter/suggestion.rb
twitter-5.13.0 lib/twitter/suggestion.rb
twitter-5.12.0 lib/twitter/suggestion.rb