Class: RSpec::Approvals::Executable
- Inherits:
-
Object
- Object
- RSpec::Approvals::Executable
- Defined in:
- lib/rspec/approvals/executable.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#on_failure ⇒ Object
Returns the value of attribute on_failure.
Instance Method Summary collapse
-
#initialize(command, &block) ⇒ Executable
constructor
A new instance of Executable.
- #to_s ⇒ Object
Constructor Details
#initialize(command, &block) ⇒ Executable
Returns a new instance of Executable.
6 7 8 9 |
# File 'lib/rspec/approvals/executable.rb', line 6 def initialize(command, &block) self.command = command self.on_failure = block end |
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command.
5 6 7 |
# File 'lib/rspec/approvals/executable.rb', line 5 def command @command end |
#on_failure ⇒ Object
Returns the value of attribute on_failure.
5 6 7 |
# File 'lib/rspec/approvals/executable.rb', line 5 def on_failure @on_failure end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/rspec/approvals/executable.rb', line 11 def to_s command end |