Class: Vines::Stream::Component::Ready
- Defined in:
- lib/vines/stream/component/ready.rb
Constant Summary
Constants inherited from State
Instance Attribute Summary
Attributes inherited from State
Instance Method Summary collapse
Methods inherited from State
#==, #eql?, #hash, #initialize
Methods included from Log
Constructor Details
This class inherits a constructor from Vines::Stream::State
Instance Method Details
#node(node) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/vines/stream/component/ready.rb', line 7 def node(node) stanza = to_stanza(node) raise StreamErrors::UnsupportedStanzaType unless stanza to = (node['to'] || '').strip from = JID.new(node['from'] || '') raise StreamErrors::ImproperAddressing if to.empty? || from.domain != stream.remote_domain if stanza.local? stream.router.connected_resources(to).each do |recipient| recipient.write(node) end else stanza.route end end |