Class: Cyclomagic::Filter
- Inherits:
-
Object
- Object
- Cyclomagic::Filter
- Defined in:
- lib/cyclomagic.rb
Overview
———— END Analyzer logic ————————————
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#warn ⇒ Object
Returns the value of attribute warn.
Instance Method Summary collapse
- #error?(count) ⇒ Boolean
- #ignore?(count) ⇒ Boolean
-
#initialize(limit = -1,, error = 11, warn = 8) ⇒ Filter
constructor
A new instance of Filter.
- #warn?(count) ⇒ Boolean
Constructor Details
#initialize(limit = -1,, error = 11, warn = 8) ⇒ Filter
Returns a new instance of Filter.
561 562 563 564 565 |
# File 'lib/cyclomagic.rb', line 561 def initialize(limit = -1, error = 11, warn = 8) @limit = limit @error = error @warn = warn end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
559 560 561 |
# File 'lib/cyclomagic.rb', line 559 def error @error end |
#limit ⇒ Object
Returns the value of attribute limit.
559 560 561 |
# File 'lib/cyclomagic.rb', line 559 def limit @limit end |
#warn ⇒ Object
Returns the value of attribute warn.
559 560 561 |
# File 'lib/cyclomagic.rb', line 559 def warn @warn end |
Instance Method Details
#error?(count) ⇒ Boolean
575 576 577 |
# File 'lib/cyclomagic.rb', line 575 def error?(count) count >= @error end |
#ignore?(count) ⇒ Boolean
567 568 569 |
# File 'lib/cyclomagic.rb', line 567 def ignore?(count) count < @limit end |
#warn?(count) ⇒ Boolean
571 572 573 |
# File 'lib/cyclomagic.rb', line 571 def warn?(count) count >= @warn end |