Class: BitlbeeConfig::Accounts::Hipchat
- Inherits:
-
Jabber
- Object
- BitlbeeConfig::Account
- Jabber
- BitlbeeConfig::Accounts::Hipchat
- Defined in:
- lib/bitlbee_config/accounts/hipchat.rb
Constant Summary collapse
- USERNAME_SUFFIX =
"@chat.hipchat.com"
Instance Attribute Summary
Attributes inherited from BitlbeeConfig::Account
#autoconnect, #cleartext_password, #handle, #password, #protocol, #server, #settings, #tag, #user
Instance Method Summary collapse
-
#ensure_handle_is_suffixed ⇒ Object
We don’t want the user to have to enter “@chat.facebook.com” with their handle, so we do it for them.
-
#initialize(options = {}) ⇒ Hipchat
constructor
A new instance of Hipchat.
Methods inherited from BitlbeeConfig::Account
#build_xml, create_new_account, from_xml, #id, #regenerate_password_if_needed
Methods included from XmlBuildable
Constructor Details
#initialize(options = {}) ⇒ Hipchat
Returns a new instance of Hipchat.
6 7 8 9 10 11 12 |
# File 'lib/bitlbee_config/accounts/hipchat.rb', line 6 def initialize( = {}) super({ tag: "hipchat", nick_format: "%full_name" }.merge()) ensure_handle_is_suffixed if @handle end |
Instance Method Details
#ensure_handle_is_suffixed ⇒ Object
We don’t want the user to have to enter “@chat.facebook.com” with their handle, so we do it for them
15 16 17 |
# File 'lib/bitlbee_config/accounts/hipchat.rb', line 15 def ensure_handle_is_suffixed @handle += USERNAME_SUFFIX unless @handle =~ /#{ USERNAME_SUFFIX }$/ end |