Sha256: a26e2ec6f3eea66c0b2592b978598f1e693ea8d3a6ffd21505fcddd69368b05f

Contents?: true

Size: 334 Bytes

Versions: 3

Compression:

Stored size: 334 Bytes

Contents

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
twitter-5.11.0 lib/twitter/suggestion.rb
twitter-5.10.0 lib/twitter/suggestion.rb
twitter-5.9.0 lib/twitter/suggestion.rb