Class: GitHooks::Notifier::JabberClient::Buddy
- Inherits:
-
Object
- Object
- GitHooks::Notifier::JabberClient::Buddy
- Defined in:
- lib/git_hooks/notifier/jabber_client.rb
Instance Attribute Summary collapse
-
#jid ⇒ Object
readonly
Returns the value of attribute jid.
Instance Method Summary collapse
-
#initialize(jid, roster_reference) ⇒ Buddy
constructor
A new instance of Buddy.
- #subscribed? ⇒ Boolean
Constructor Details
#initialize(jid, roster_reference) ⇒ Buddy
Returns a new instance of Buddy.
12 13 14 15 |
# File 'lib/git_hooks/notifier/jabber_client.rb', line 12 def initialize(jid, roster_reference) @jid = Jabber::JID.new(jid) @roster = roster_reference end |
Instance Attribute Details
#jid ⇒ Object (readonly)
Returns the value of attribute jid.
10 11 12 |
# File 'lib/git_hooks/notifier/jabber_client.rb', line 10 def jid @jid end |
Instance Method Details
#subscribed? ⇒ Boolean
17 18 19 20 21 22 |
# File 'lib/git_hooks/notifier/jabber_client.rb', line 17 def subscribed? roster_item = @roster[jid] if roster_item return roster_item.subscription == :both ? true : false end end |