Class: CoverageInterpreter2

Inherits:
DslContext show all
Defined in:
lib/CoverageInterpreter2.rb

Instance Method Summary collapse

Methods inherited from DslContext

bubble, execute, polish_text

Constructor Details

#initializeCoverageInterpreter2

Returns a new instance of CoverageInterpreter2.



4
5
6
7
# File 'lib/CoverageInterpreter2.rb', line 4

def initialize
  @name = ''
  @entity = Array.new
end

Instance Method Details

#coverage(*args) ⇒ Object



13
14
15
# File 'lib/CoverageInterpreter2.rb', line 13

def coverage(*args)
  @name = args[0].to_s
end

#endcoverage(*args) ⇒ Object



17
18
19
# File 'lib/CoverageInterpreter2.rb', line 17

def endcoverage(*args)
  #nothing to do here at the mo
end

#endentity(*args) ⇒ Object



25
26
27
# File 'lib/CoverageInterpreter2.rb', line 25

def endentity(*args)
  endcoverage(args)
end

#entity(*args) ⇒ Object



21
22
23
# File 'lib/CoverageInterpreter2.rb', line 21

def entity(*args)
  coverage(args)
end

#getResultObject



9
10
11
# File 'lib/CoverageInterpreter2.rb', line 9

def getResult
  @entity
end

#use(*args) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/CoverageInterpreter2.rb', line 29

def use(*args)
  # remove the trailing defaults and stuff
  if(args.last.class.name == 'Hash')
    args.pop
  end
  @entity << args.collect{ |p| ':' + (p.to_s()) }.join(',')
end