Sha256: 606dc08fe189fb34bc6f68e540683604a5bdf56dea0f896b1fd53e9f1f1d7850
Contents?: true
Size: 1.07 KB
Versions: 12
Compression:
Stored size: 1.07 KB
Contents
require 'twitter/base' require 'twitter/creatable' module Twitter module Action class Mention < Twitter::Base include Twitter::Creatable attr_reader :max_position, :min_position # A collection of users who mentioned a user # # @return [Array<Twitter::User>] def sources @sources = Array(@attrs[:sources]).map do |user| Twitter::User.fetch_or_new(user) end end # The user who mentioned a user # # @return [Twitter::User] def source @source = sources.first end # A collection of tweets that mention a user # # @return [Array<Twitter::Tweet>] def target_objects @target_objects = Array(@attrs[:target_objects]).map do |tweet| Twitter::Tweet.fetch_or_new(tweet) end end # A collection containing the mentioned user # # @return [Array<Twitter::User>] def targets @targets = Array(@attrs[:targets]).map do |user| Twitter::User.fetch_or_new(user) end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems