Class: NCover::CyclomaticComplexity

Inherits:
Object
  • Object
show all
Includes:
UpdateAttributes
Defined in:
lib/albacore/ncoverreports/cyclomaticcomplexity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from UpdateAttributes

#<<, #update_attributes

Constructor Details

#initialize(params = {}) ⇒ CyclomaticComplexity

Returns a new instance of CyclomaticComplexity.



9
10
11
12
13
14
# File 'lib/albacore/ncoverreports/cyclomaticcomplexity.rb', line 9

def initialize(params={})
  @maximum = 100
  @item_type = :View
  update_attributes(params) unless params.nil?
  super()
end

Instance Attribute Details

#item_typeObject

Returns the value of attribute item_type.



7
8
9
# File 'lib/albacore/ncoverreports/cyclomaticcomplexity.rb', line 7

def item_type
  @item_type
end

#maximumObject

Returns the value of attribute maximum.



7
8
9
# File 'lib/albacore/ncoverreports/cyclomaticcomplexity.rb', line 7

def maximum
  @maximum
end

Instance Method Details

#get_coverage_optionsObject



16
17
18
19
20
21
# File 'lib/albacore/ncoverreports/cyclomaticcomplexity.rb', line 16

def get_coverage_options
  options = "CyclomaticComplexity"
  options << ":#{maximum}" unless maximum.nil?
  options << ":#{item_type}" unless item_type.nil?
  options
end