Class: CukeParser::CukeModel::CukeScenario

Inherits:
Object
  • Object
show all
Defined in:
lib/cuke_model/scenario.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_durationObject

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

#durationObject

this will store all the info for a scenario



5
6
7
# File 'lib/cuke_model/scenario.rb', line 5

def duration
  @duration
end

#keywordObject (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

#nameObject (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

#statusObject

this will store all the info for a scenario



5
6
7
# File 'lib/cuke_model/scenario.rb', line 5

def status
  @status
end

#stepsObject

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

#getFullNameObject



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_csvObject



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_prettyObject



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