Sha256: d4d8dd4a4f16ebc8d6681336d9750f8b3ca3c3da0af7845923cb9c2d40179b1a
Contents?: true
Size: 482 Bytes
Versions: 7
Compression:
Stored size: 482 Bytes
Contents
module Chatterbot # Assorted handy utility methods module Utils # # return the id of a tweet, or the incoming object (likely already # an ID) # # @param [Tweet] t the Tweet def id_from_tweet(t) t.is_a?(Twitter::Tweet) ? t.id : t end # # return the id of a User, or the incoming object (likely already # an ID) # # @param [User] u the User def id_from_user(u) u.is_a?(Twitter::User) ? u.id : u end end end
Version data entries
7 entries across 7 versions & 1 rubygems