Class: Vines::Stream::Http::Bind
- Inherits:
-
Client::Bind
- Object
- State
- Client::Bind
- Vines::Stream::Http::Bind
- Defined in:
- lib/vines/stream/http/bind.rb
Constant Summary collapse
- FEATURES =
%Q{<stream:features xmlns:stream="#{NAMESPACES[:stream]}"/>}.freeze
Constants inherited from Client::Bind
Client::Bind::MAX_ATTEMPTS, Client::Bind::NS
Constants inherited from State
Instance Attribute Summary
Attributes inherited from State
Instance Method Summary collapse
-
#initialize(stream, success = Ready) ⇒ Bind
constructor
A new instance of Bind.
- #node(node) ⇒ Object
Methods inherited from State
Methods included from Log
Constructor Details
#initialize(stream, success = Ready) ⇒ Bind
Returns a new instance of Bind.
9 10 11 |
# File 'lib/vines/stream/http/bind.rb', line 9 def initialize(stream, success=Ready) super end |
Instance Method Details
#node(node) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/vines/stream/http/bind.rb', line 13 def node(node) unless stream.valid_session?(node['sid']) && body?(node) && node['rid'] raise StreamErrors::NotAuthorized end nodes = stream.parse_body(node) raise StreamErrors::NotAuthorized unless nodes.size == 1 super(nodes.first) end |