Class: HttpStub::Configurer::Command
- Inherits:
-
Object
- Object
- HttpStub::Configurer::Command
- Defined in:
- lib/http_stub/configurer/command.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(args) ⇒ Command
constructor
A new instance of Command.
- #resetable? ⇒ Boolean
Constructor Details
#initialize(args) ⇒ Command
Returns a new instance of Command.
8 9 10 11 12 13 |
# File 'lib/http_stub/configurer/command.rb', line 8 def initialize(args) @processor = args[:processor] @request = args[:request] @description = args[:description] @resetable_flag = !!args[:resetable] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/http_stub/configurer/command.rb', line 6 def description @description end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
6 7 8 |
# File 'lib/http_stub/configurer/command.rb', line 6 def request @request end |
Instance Method Details
#execute ⇒ Object
15 16 17 |
# File 'lib/http_stub/configurer/command.rb', line 15 def execute @processor.process(self) end |
#resetable? ⇒ Boolean
19 20 21 |
# File 'lib/http_stub/configurer/command.rb', line 19 def resetable? @resetable_flag end |