Class: Filter
- Inherits:
-
Object
- Object
- Filter
- Defined in:
- lib/saikuro/filter.rb
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.
4 5 6 7 8 |
# File 'lib/saikuro/filter.rb', line 4 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.
2 3 4 |
# File 'lib/saikuro/filter.rb', line 2 def error @error end |
#limit ⇒ Object
Returns the value of attribute limit.
2 3 4 |
# File 'lib/saikuro/filter.rb', line 2 def limit @limit end |
#warn ⇒ Object
Returns the value of attribute warn.
2 3 4 |
# File 'lib/saikuro/filter.rb', line 2 def warn @warn end |
Instance Method Details
#error?(count) ⇒ Boolean
18 19 20 |
# File 'lib/saikuro/filter.rb', line 18 def error?(count) count >= @error end |
#ignore?(count) ⇒ Boolean
10 11 12 |
# File 'lib/saikuro/filter.rb', line 10 def ignore?(count) count < @limit end |
#warn?(count) ⇒ Boolean
14 15 16 |
# File 'lib/saikuro/filter.rb', line 14 def warn?(count) count >= @warn end |