Module: Twitter

Defined in:
lib/twitter/geo.rb,
lib/twitter/base.rb,
lib/twitter/list.rb,
lib/twitter/size.rb,
lib/twitter/user.rb,
lib/twitter/error.rb,
lib/twitter/place.rb,
lib/twitter/trend.rb,
lib/twitter/tweet.rb,
lib/twitter/utils.rb,
lib/twitter/client.rb,
lib/twitter/cursor.rb,
lib/twitter/entity.rb,
lib/twitter/oembed.rb,
lib/twitter/factory.rb,
lib/twitter/headers.rb,
lib/twitter/profile.rb,
lib/twitter/variant.rb,
lib/twitter/version.rb,
lib/twitter/entities.rb,
lib/twitter/identity.rb,
lib/twitter/language.rb,
lib/twitter/metadata.rb,
lib/twitter/rest/api.rb,
lib/twitter/settings.rb,
lib/twitter/arguments.rb,
lib/twitter/creatable.rb,
lib/twitter/geo/point.rb,
lib/twitter/rest/help.rb,
lib/twitter/basic_user.rb,
lib/twitter/entity/uri.rb,
lib/twitter/enumerable.rb,
lib/twitter/rate_limit.rb,
lib/twitter/rest/lists.rb,
lib/twitter/rest/oauth.rb,
lib/twitter/rest/users.rb,
lib/twitter/rest/utils.rb,
lib/twitter/suggestion.rb,
lib/twitter/geo/polygon.rb,
lib/twitter/geo_factory.rb,
lib/twitter/geo_results.rb,
lib/twitter/media/photo.rb,
lib/twitter/media/video.rb,
lib/twitter/null_object.rb,
lib/twitter/rest/client.rb,
lib/twitter/rest/search.rb,
lib/twitter/rest/trends.rb,
lib/twitter/rest/tweets.rb,
lib/twitter/source_user.rb,
lib/twitter/target_user.rb,
lib/twitter/relationship.rb,
lib/twitter/rest/request.rb,
lib/twitter/saved_search.rb,
lib/twitter/entity/symbol.rb,
lib/twitter/media_factory.rb,
lib/twitter/trend_results.rb,
lib/twitter/direct_message.rb,
lib/twitter/entity/hashtag.rb,
lib/twitter/profile_banner.rb,
lib/twitter/rest/favorites.rb,
lib/twitter/rest/timelines.rb,
lib/twitter/search_results.rb,
lib/twitter/streaming/event.rb,
lib/twitter/media/video_info.rb,
lib/twitter/streaming/client.rb,
lib/twitter/rest/form_encoder.rb,
lib/twitter/rest/undocumented.rb,
lib/twitter/rest/upload_utils.rb,
lib/twitter/media/animated_gif.rb,
lib/twitter/streaming/response.rb,
lib/twitter/entity/user_mention.rb,
lib/twitter/rest/places_and_geo.rb,
lib/twitter/rest/premium_search.rb,
lib/twitter/rest/saved_searches.rb,
lib/twitter/rest/spam_reporting.rb,
lib/twitter/direct_message_event.rb,
lib/twitter/rest/direct_messages.rb,
lib/twitter/rest/suggested_users.rb,
lib/twitter/streaming/connection.rb,
lib/twitter/rest/account_activity.rb,
lib/twitter/streaming/friend_list.rb,
lib/twitter/premium_search_results.rb,
lib/twitter/streaming/deleted_tweet.rb,
lib/twitter/streaming/stall_warning.rb,
lib/twitter/streaming/message_parser.rb,
lib/twitter/rest/friends_and_followers.rb,
lib/twitter/direct_messages/welcome_message.rb,
lib/twitter/direct_messages/welcome_message_rule.rb,
lib/twitter/rest/direct_messages/welcome_messages.rb,
lib/twitter/direct_messages/welcome_message_wrapper.rb,
lib/twitter/direct_messages/welcome_message_rule_wrapper.rb

Defined Under Namespace

Modules: Creatable, DirectMessages, Entities, Enumerable, Media, Profile, REST, Streaming, Utils, Version Classes: Arguments, Base, BasicUser, Client, Cursor, DirectMessage, DirectMessageEvent, Entity, Error, Factory, Geo, GeoFactory, GeoResults, Headers, Identity, Language, List, MediaFactory, Metadata, OEmbed, Place, PremiumSearchResults, ProfileBanner, RateLimit, Relationship, SavedSearch, SearchResults, Settings, Size, SourceUser, Suggestion, TargetUser, Trend, TrendResults, Tweet, User, Variant

Constant Summary collapse

NullObject =

rubocop:disable Metrics/BlockLength

Naught.build do |config| # rubocop:disable Metrics/BlockLength
  include Comparable

  config.black_hole
  config.define_explicit_conversions
  config.define_implicit_conversions
  config.predicates_return false

  def !
    true
  end

  def respond_to?(*)
    true
  end

  def instance_of?(klass)
    raise(TypeError, "class or module required") unless klass.is_a?(Class)

    self.class == klass
  end

  def kind_of?(mod)
    raise(TypeError, "class or module required") unless mod.is_a?(Module)

    self.class.ancestors.include?(mod)
  end

  alias_method :is_a?, :kind_of?

  def <=>(other)
    if other.is_a?(self.class)
      0
    else
      -1
    end
  end

  def nil?
    true
  end

  def as_json(*)
    "null"
  end

  def to_json(*args)
    nil.to_json(*args)
  end

  def presence
    nil
  end

  def blank?
    true
  end

  def present?
    false
  end
end