Sha256: da5b0443e914b6f0d0545fdcc5f8e94b2e212979c6c881cc0730ae12c1d320ca

Contents?: true

Size: 460 Bytes

Versions: 1

Compression:

Stored size: 460 Bytes

Contents

require 'twitter/base'

module Twitter
  class Suggestion < Twitter::Base
    attr_reader :name, :size, :slug

    # @param other [Twitter::Suggestion]
    # @return [Boolean]
    def ==(other)
      super || attr_equal(:slug, other) || attrs_equal(other)
    end

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

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twitter-5.0.0.rc.1 lib/twitter/suggestion.rb