Class: Gurke::Background
- Inherits:
-
Object
- Object
- Gurke::Background
- Defined in:
- lib/gurke/background.rb
Instance Attribute Summary collapse
-
#file ⇒ String
readonly
Return path to file containing this background.
-
#line ⇒ Fixnum
readonly
Return line number where this background is defined.
- #raw ⇒ Object readonly private
-
#steps ⇒ Array<Step>
readonly
List of steps this background specifies.
Instance Method Summary collapse
-
#initialize(file, line, raw) ⇒ Background
constructor
private
A new instance of Background.
- #run(runner, reporter, scenario, world) ⇒ Object private
Constructor Details
#initialize(file, line, raw) ⇒ Background
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Background.
28 29 30 31 32 33 |
# File 'lib/gurke/background.rb', line 28 def initialize(file, line, raw) @file = file @line = line @raw = raw @steps = RunList.new end |
Instance Attribute Details
#file ⇒ String (readonly)
Return path to file containing this background.
10 11 12 |
# File 'lib/gurke/background.rb', line 10 def file @file end |
#line ⇒ Fixnum (readonly)
Return line number where this background is defined.
16 17 18 |
# File 'lib/gurke/background.rb', line 16 def line @line end |
#raw ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 |
# File 'lib/gurke/background.rb', line 25 def raw @raw end |
#steps ⇒ Array<Step> (readonly)
List of steps this background specifies.
22 23 24 |
# File 'lib/gurke/background.rb', line 22 def steps @steps end |
Instance Method Details
#run(runner, reporter, scenario, world) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 40 41 42 43 |
# File 'lib/gurke/background.rb', line 37 def run(runner, reporter, scenario, world) reporter.invoke :start_background, self, scenario steps.run runner, reporter, scenario, world ensure reporter.invoke :end_background, self, scenario end |