Class: CukeParser::CukeModel::CukeScenario
- Inherits:
-
Object
- Object
- CukeParser::CukeModel::CukeScenario
- Defined in:
- lib/cuke_model/scenario.rb
Instance Attribute Summary collapse
-
#converted_duration ⇒ Object
this will store all the info for a scenario.
-
#duration ⇒ Object
this will store all the info for a scenario.
-
#keyword ⇒ Object
readonly
this will store all the info for a scenario.
-
#name ⇒ Object
readonly
this will store all the info for a scenario.
-
#status ⇒ Object
this will store all the info for a scenario.
-
#steps ⇒ Object
this will store all the info for a scenario.
Instance Method Summary collapse
- #getFullName ⇒ Object
-
#initialize(keyword, name) ⇒ CukeScenario
constructor
A new instance of CukeScenario.
- #to_csv ⇒ Object
- #to_csv_pretty ⇒ Object
Constructor Details
#initialize(keyword, name) ⇒ CukeScenario
Returns a new instance of CukeScenario.
7 8 9 10 11 12 13 14 |
# File 'lib/cuke_model/scenario.rb', line 7 def initialize(keyword, name) @keyword = keyword @name = name @duration = 0 @converted_duration = 0 @steps = [] @status = "" end |
Instance Attribute Details
#converted_duration ⇒ Object
this will store all the info for a scenario
5 6 7 |
# File 'lib/cuke_model/scenario.rb', line 5 def converted_duration @converted_duration end |
#duration ⇒ Object
this will store all the info for a scenario
5 6 7 |
# File 'lib/cuke_model/scenario.rb', line 5 def duration @duration end |
#keyword ⇒ Object (readonly)
this will store all the info for a scenario
5 6 7 |
# File 'lib/cuke_model/scenario.rb', line 5 def keyword @keyword end |
#name ⇒ Object (readonly)
this will store all the info for a scenario
5 6 7 |
# File 'lib/cuke_model/scenario.rb', line 5 def name @name end |
#status ⇒ Object
this will store all the info for a scenario
5 6 7 |
# File 'lib/cuke_model/scenario.rb', line 5 def status @status end |
#steps ⇒ Object
this will store all the info for a scenario
5 6 7 |
# File 'lib/cuke_model/scenario.rb', line 5 def steps @steps end |
Instance Method Details
#getFullName ⇒ Object
26 27 28 29 30 |
# File 'lib/cuke_model/scenario.rb', line 26 def getFullName #returns keyword + name fullName = @keyword + " " + @name return fullName end |
#to_csv ⇒ Object
16 17 18 19 |
# File 'lib/cuke_model/scenario.rb', line 16 def to_csv #prints csv format "#@keyword,#@name,#@duration,#@converted_duration" end |
#to_csv_pretty ⇒ Object
21 22 23 24 |
# File 'lib/cuke_model/scenario.rb', line 21 def to_csv_pretty #prints pretty csv format "\t\t #@keyword,#@name,#@duration,#@converted_duration" end |