Class: Hipbot::User

Inherits:
Object
  • Object
show all
Defined in:
lib/hipbot/user.rb

Instance Method Summary collapse

Instance Method Details

#first_nameObject



11
12
13
# File 'lib/hipbot/user.rb', line 11

def first_name
  name.split.first
end

#mentionObject



7
8
9
# File 'lib/hipbot/user.rb', line 7

def mention
  attributes[:mention] || name.gsub(/\s+/, '')
end

#myself?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/hipbot/user.rb', line 15

def myself?
  self == Hipbot.user
end

#send_message(message) ⇒ Object



3
4
5
# File 'lib/hipbot/user.rb', line 3

def send_message message
  Hipbot.send_to_user self, message
end