Class: FeatureLog
- Inherits:
-
Object
- Object
- FeatureLog
- Defined in:
- lib/logs/feature_log.rb
Instance Attribute Summary collapse
-
#currentScenariosNumber ⇒ Object
Returns the value of attribute currentScenariosNumber.
-
#endDate ⇒ Object
Returns the value of attribute endDate.
-
#executionId ⇒ Object
Returns the value of attribute executionId.
-
#featureId ⇒ Object
Returns the value of attribute featureId.
-
#result ⇒ Object
Returns the value of attribute result.
-
#resultSet ⇒ Object
Returns the value of attribute resultSet.
-
#scenarioLogs ⇒ Object
Returns the value of attribute scenarioLogs.
-
#startDate ⇒ Object
Returns the value of attribute startDate.
-
#totalScenariosNumber ⇒ Object
Returns the value of attribute totalScenariosNumber.
-
#versionId ⇒ Object
Returns the value of attribute versionId.
Instance Method Summary collapse
- #addScenarioLog(scenarioLog) ⇒ Object
- #addScenarioResult(result) ⇒ Object
- #done? ⇒ Boolean
-
#initialize ⇒ FeatureLog
constructor
A new instance of FeatureLog.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize ⇒ FeatureLog
Returns a new instance of FeatureLog.
5 6 7 8 9 |
# File 'lib/logs/feature_log.rb', line 5 def initialize @currentScenariosNumber = 0 @scenarioLogs = [] @resultSet = [] end |
Instance Attribute Details
#currentScenariosNumber ⇒ Object
Returns the value of attribute currentScenariosNumber.
2 3 4 |
# File 'lib/logs/feature_log.rb', line 2 def currentScenariosNumber @currentScenariosNumber end |
#endDate ⇒ Object
Returns the value of attribute endDate.
2 3 4 |
# File 'lib/logs/feature_log.rb', line 2 def endDate @endDate end |
#executionId ⇒ Object
Returns the value of attribute executionId.
2 3 4 |
# File 'lib/logs/feature_log.rb', line 2 def executionId @executionId end |
#featureId ⇒ Object
Returns the value of attribute featureId.
2 3 4 |
# File 'lib/logs/feature_log.rb', line 2 def featureId @featureId end |
#result ⇒ Object
Returns the value of attribute result.
2 3 4 |
# File 'lib/logs/feature_log.rb', line 2 def result @result end |
#resultSet ⇒ Object
Returns the value of attribute resultSet.
2 3 4 |
# File 'lib/logs/feature_log.rb', line 2 def resultSet @resultSet end |
#scenarioLogs ⇒ Object
Returns the value of attribute scenarioLogs.
2 3 4 |
# File 'lib/logs/feature_log.rb', line 2 def scenarioLogs @scenarioLogs end |
#startDate ⇒ Object
Returns the value of attribute startDate.
2 3 4 |
# File 'lib/logs/feature_log.rb', line 2 def startDate @startDate end |
#totalScenariosNumber ⇒ Object
Returns the value of attribute totalScenariosNumber.
2 3 4 |
# File 'lib/logs/feature_log.rb', line 2 def totalScenariosNumber @totalScenariosNumber end |
#versionId ⇒ Object
Returns the value of attribute versionId.
2 3 4 |
# File 'lib/logs/feature_log.rb', line 2 def versionId @versionId end |
Instance Method Details
#addScenarioLog(scenarioLog) ⇒ Object
21 22 23 |
# File 'lib/logs/feature_log.rb', line 21 def addScenarioLog scenarioLog @scenarioLogs.push scenarioLog end |
#addScenarioResult(result) ⇒ Object
16 17 18 19 |
# File 'lib/logs/feature_log.rb', line 16 def addScenarioResult result @resultSet.push result @currentScenariosNumber += 1 end |
#done? ⇒ Boolean
25 26 27 |
# File 'lib/logs/feature_log.rb', line 25 def done? @currentScenariosNumber.eql? totalScenariosNumber end |
#to_json(options = {}) ⇒ Object
11 12 13 14 |
# File 'lib/logs/feature_log.rb', line 11 def to_json(={}) {'feature_id' => @featureId, 'result' => @result, 'start_date' => @startDate, 'end_date' => @endDate, 'execution_id' => @executionId, 'scenario_logs' => @scenarioLogs, 'versionId' => @versionId}.to_json end |