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 |
# File 'lib/vines/stream/component/ready.rb', line 7 def node(node) stanza = to_stanza(node) raise StreamErrors::UnsupportedStanzaType unless stanza to, from = stanza.validate_to, stanza.validate_from raise StreamErrors::ImproperAddressing unless to && from raise StreamErrors::InvalidFrom unless from.domain == stream.remote_domain stream.user = User.new(jid: from) if stanza.local? || stanza.to_pubsub_domain? stanza.process else stanza.route end end |