Module: Chatterbot::Utils

Included in:
Bot
Defined in:
lib/chatterbot/utils.rb

Instance Method Summary collapse

Instance Method Details

#id_from_tweet(t) ⇒ Object


3
4
5
# File 'lib/chatterbot/utils.rb', line 3

def id_from_tweet(t)
  t.is_a?(Twitter::Tweet) ? t.id : t
end

#id_from_user(u) ⇒ Object


7
8
9
# File 'lib/chatterbot/utils.rb', line 7

def id_from_user(u)
  u.is_a?(Twitter::User) ? u.id : u
end