Class: UICov::CoverageInfo
- Inherits:
-
Object
- Object
- UICov::CoverageInfo
- Defined in:
- lib/uicov/coverage_info.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#hits ⇒ Object
readonly
Returns the value of attribute hits.
Instance Method Summary collapse
- #covered? ⇒ Boolean
- #hit ⇒ Object
-
#initialize(missed = false) ⇒ CoverageInfo
constructor
A new instance of CoverageInfo.
- #missed? ⇒ Boolean
Constructor Details
#initialize(missed = false) ⇒ CoverageInfo
Returns a new instance of CoverageInfo.
9 10 11 12 |
# File 'lib/uicov/coverage_info.rb', line 9 def initialize(missed = false) @hits = 0 @missed = missed end |
Instance Attribute Details
#hits ⇒ Object (readonly)
Returns the value of attribute hits.
7 8 9 |
# File 'lib/uicov/coverage_info.rb', line 7 def hits @hits end |
Instance Method Details
#covered? ⇒ Boolean
18 19 20 |
# File 'lib/uicov/coverage_info.rb', line 18 def covered? 0 < hits end |
#hit ⇒ Object
22 23 24 25 |
# File 'lib/uicov/coverage_info.rb', line 22 def hit @hits = hits.succ return self end |
#missed? ⇒ Boolean
14 15 16 |
# File 'lib/uicov/coverage_info.rb', line 14 def missed? @missed end |