Class: NCover::CodeCoverageBase
- Inherits:
-
Object
- Object
- NCover::CodeCoverageBase
- Includes:
- UpdateAttributes
- Defined in:
- lib/albacore/ncoverreports/codecoveragebase.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#coverage_type ⇒ Object
Returns the value of attribute coverage_type.
-
#item_type ⇒ Object
Returns the value of attribute item_type.
-
#minimum ⇒ Object
Returns the value of attribute minimum.
Instance Method Summary collapse
- #get_coverage_options ⇒ Object
-
#initialize(coverage_type, params = {}) ⇒ CodeCoverageBase
constructor
A new instance of CodeCoverageBase.
Methods included from UpdateAttributes
Constructor Details
#initialize(coverage_type, params = {}) ⇒ CodeCoverageBase
Returns a new instance of CodeCoverageBase.
9 10 11 12 13 14 15 |
# File 'lib/albacore/ncoverreports/codecoveragebase.rb', line 9 def initialize(coverage_type, params={}) @coverage_type = coverage_type @minimum = 0 @item_type = :View update_attributes(params) unless params.nil? super() end |
Instance Attribute Details
#coverage_type ⇒ Object
Returns the value of attribute coverage_type.
7 8 9 |
# File 'lib/albacore/ncoverreports/codecoveragebase.rb', line 7 def coverage_type @coverage_type end |
#item_type ⇒ Object
Returns the value of attribute item_type.
7 8 9 |
# File 'lib/albacore/ncoverreports/codecoveragebase.rb', line 7 def item_type @item_type end |
#minimum ⇒ Object
Returns the value of attribute minimum.
7 8 9 |
# File 'lib/albacore/ncoverreports/codecoveragebase.rb', line 7 def minimum @minimum end |
Instance Method Details
#get_coverage_options ⇒ Object
17 18 19 20 21 22 |
# File 'lib/albacore/ncoverreports/codecoveragebase.rb', line 17 def = "#{@coverage_type}" << ":#{@minimum}" unless @minimum.nil? << ":#{@item_type}" unless @item_type.nil? end |