lib/chatterbot/helpers.rb
def from_user(s)
      case s
      when Twitter::Tweet
        s.user.screen_name
      when Twitter::User
        s.name
      when String
        s
      end
    end
def from_user(s)
      case s
      when Twitter::Tweet
        s.user.screen_name
      when Twitter::User
        s.name
      when String
        s
      end
    end
def from_user ( s ) case s when Twitter :: Tweet s . user . screen_name when Twitter :: User s . name when String s end end
Pull the username from a tweet hash -- this is different depending on
 if we're doing a search, or parsing through replies/mentions.
Pull the username from a tweet hash -- this is different depending on if we re doing a search or parsing through replies / mentions .