Class: FeatureLog

Inherits:
Object
  • Object
show all
Defined in:
lib/logs/feature_log.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFeatureLog

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

#currentScenariosNumberObject

Returns the value of attribute currentScenariosNumber.



2
3
4
# File 'lib/logs/feature_log.rb', line 2

def currentScenariosNumber
  @currentScenariosNumber
end

#endDateObject

Returns the value of attribute endDate.



2
3
4
# File 'lib/logs/feature_log.rb', line 2

def endDate
  @endDate
end

#executionIdObject

Returns the value of attribute executionId.



2
3
4
# File 'lib/logs/feature_log.rb', line 2

def executionId
  @executionId
end

#featureIdObject

Returns the value of attribute featureId.



2
3
4
# File 'lib/logs/feature_log.rb', line 2

def featureId
  @featureId
end

#resultObject

Returns the value of attribute result.



2
3
4
# File 'lib/logs/feature_log.rb', line 2

def result
  @result
end

#resultSetObject

Returns the value of attribute resultSet.



2
3
4
# File 'lib/logs/feature_log.rb', line 2

def resultSet
  @resultSet
end

#scenarioLogsObject

Returns the value of attribute scenarioLogs.



2
3
4
# File 'lib/logs/feature_log.rb', line 2

def scenarioLogs
  @scenarioLogs
end

#startDateObject

Returns the value of attribute startDate.



2
3
4
# File 'lib/logs/feature_log.rb', line 2

def startDate
  @startDate
end

#totalScenariosNumberObject

Returns the value of attribute totalScenariosNumber.



2
3
4
# File 'lib/logs/feature_log.rb', line 2

def totalScenariosNumber
  @totalScenariosNumber
end

#versionIdObject

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

Returns:

  • (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(options={})
  {'feature_id' => @featureId, 'result' => @result, 'start_date' => @startDate, 'end_date' => @endDate, 'execution_id' => @executionId,
   'scenario_logs' => @scenarioLogs, 'versionId' => @versionId}.to_json
end