Class: Mockingbird::ConnectionScript
- Inherits:
-
Object
- Object
- Mockingbird::ConnectionScript
- Defined in:
- lib/mockingbird/connection_script.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #add_command(command = nil) ⇒ Object
-
#initialize ⇒ ConnectionScript
constructor
A new instance of ConnectionScript.
Constructor Details
#initialize ⇒ ConnectionScript
Returns a new instance of ConnectionScript.
7 8 9 10 |
# File 'lib/mockingbird/connection_script.rb', line 7 def initialize self.body = Commands::Command.new @last_command = body end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
5 6 7 |
# File 'lib/mockingbird/connection_script.rb', line 5 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers.
5 6 7 |
# File 'lib/mockingbird/connection_script.rb', line 5 def headers @headers end |
#status ⇒ Object
Returns the value of attribute status.
5 6 7 |
# File 'lib/mockingbird/connection_script.rb', line 5 def status @status end |
Instance Method Details
#add_command(command = nil) ⇒ Object
12 13 14 15 |
# File 'lib/mockingbird/connection_script.rb', line 12 def add_command(command=nil) @last_command.next_command = command @last_command = command end |