Class: Punchblock::Command::Redirect
- Inherits:
-
Punchblock::CommandNode
- Object
- Niceogiri::XML::Node
- RayoNode
- Punchblock::CommandNode
- Punchblock::Command::Redirect
- Includes:
- HasHeaders
- Defined in:
- lib/punchblock/command/redirect.rb
Instance Attribute Summary
Attributes inherited from RayoNode
#call_id, #client, #component_id, #connection, #original_component
Class Method Summary collapse
-
.new(options = {}) ⇒ Command::Redirect
Create an Rayo redirect message.
Instance Method Summary collapse
-
#inspect_attributes ⇒ Object
:nodoc:.
-
#to ⇒ String
The redirect target.
- #to=(redirect_to) ⇒ Object
Methods included from HasHeaders
#headers, #headers=, #headers_hash
Methods inherited from Punchblock::CommandNode
#initialize, #response, #response=, #write_attr
Methods inherited from RayoNode
class_from_registration, #eql?, import, #inspect, register, #source
Constructor Details
This class inherits a constructor from Punchblock::CommandNode
Class Method Details
.new(options = {}) ⇒ Command::Redirect
Create an Rayo redirect message
25 26 27 28 29 30 |
# File 'lib/punchblock/command/redirect.rb', line 25 def self.new( = {}) super().tap do |new_node| new_node.to = [:to] new_node.headers = [:headers] end end |
Instance Method Details
#inspect_attributes ⇒ Object
:nodoc:
44 45 46 |
# File 'lib/punchblock/command/redirect.rb', line 44 def inspect_attributes # :nodoc: [:to] + super end |
#to ⇒ String
Returns the redirect target.
34 35 36 |
# File 'lib/punchblock/command/redirect.rb', line 34 def to read_attr :to end |
#to=(redirect_to) ⇒ Object
40 41 42 |
# File 'lib/punchblock/command/redirect.rb', line 40 def to=(redirect_to) write_attr :to, redirect_to end |