Class: Vines::Stream::Http::Ready
- Inherits:
-
Client::Ready
- Object
- State
- Client::Ready
- Vines::Stream::Http::Ready
- Defined in:
- lib/vines/stream/http/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
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/vines/stream/http/ready.rb', line 9 def node(node) unless stream.valid_session?(node[SID]) && body?(node) && node[RID] raise StreamErrors::NotAuthorized end stream.parse_body(node).each do |child| begin super(child) rescue StanzaError => e stream.error(e) end end stream.terminate if terminate?(node) end |
#terminate?(node) ⇒ Boolean
23 24 25 |
# File 'lib/vines/stream/http/ready.rb', line 23 def terminate?(node) node[TYPE] == TERMINATE end |