class Blather::Stanza::Message::MUCUser::InviteBase
Public Class Methods
new(element_name, to = nil, from = nil, reason = nil, document = nil)
click to toggle source
Calls superclass method
# File lib/blather/stanza/message/muc_user.rb, line 51 def self.new(element_name, to = nil, from = nil, reason = nil, document = nil) new_node = super element_name, document case to when self to.document ||= document return to when Nokogiri::XML::Node new_node.inherit to when Hash new_node.to = to[:to] new_node.from = to[:from] new_node.reason = to[:reason] else new_node.to = to new_node.from = from new_node.reason = reason end new_node end
Public Instance Methods
from()
click to toggle source
# File lib/blather/stanza/message/muc_user.rb, line 80 def from read_attr :from end
from=(val)
click to toggle source
# File lib/blather/stanza/message/muc_user.rb, line 84 def from=(val) write_attr :from, val end
reason()
click to toggle source
# File lib/blather/stanza/message/muc_user.rb, line 88 def reason reason_node.content.strip end
reason=(val)
click to toggle source
# File lib/blather/stanza/message/muc_user.rb, line 92 def reason=(val) reason_node.content = val end
reason_node()
click to toggle source
# File lib/blather/stanza/message/muc_user.rb, line 96 def reason_node unless reason = find_first('ns:reason', :ns => MUCUser.registered_ns) self << (reason = XMPPNode.new('reason', self.document)) end reason end
to()
click to toggle source
# File lib/blather/stanza/message/muc_user.rb, line 72 def to read_attr :to end
to=(val)
click to toggle source
# File lib/blather/stanza/message/muc_user.rb, line 76 def to=(val) write_attr :to, val end