Class: Doctrine::Run
- Inherits:
-
Object
- Object
- Doctrine::Run
- Defined in:
- lib/doctrine/run.rb
Overview
- public
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
[public].
Instance Method Summary collapse
-
#errored(error) ⇒ Object
[public].
-
#errored? ⇒ Boolean
[public].
-
#initialize(doctrine:, tenet:) ⇒ Run
constructor
A new instance of Run.
-
#perform ⇒ Object
[public].
Constructor Details
#initialize(doctrine:, tenet:) ⇒ Run
Returns a new instance of Run.
7 8 9 10 11 |
# File 'lib/doctrine/run.rb', line 7 def initialize(doctrine:, tenet:) @doctrine = doctrine @tenet = tenet @error = nil end |
Instance Attribute Details
#error ⇒ Object (readonly)
- public
15 16 17 |
# File 'lib/doctrine/run.rb', line 15 def error @error end |
Instance Method Details
#errored(error) ⇒ Object
- public
33 34 35 |
# File 'lib/doctrine/run.rb', line 33 def errored(error) @error = error end |
#errored? ⇒ Boolean
- public
27 28 29 |
# File 'lib/doctrine/run.rb', line 27 def errored? !@error.nil? end |
#perform ⇒ Object
- public
19 20 21 22 23 |
# File 'lib/doctrine/run.rb', line 19 def perform @doctrine.new.instance_eval(&@tenet.block) rescue => error errored(error) end |