Class: Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/saikuro.rb

Overview

———— END Analyzer logic ————————————

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(limit = -1,, error = 11, warn = 8) ⇒ Filter

Returns a new instance of Filter.



599
600
601
602
603
# File 'lib/saikuro.rb', line 599

def initialize(limit = -1, error = 11, warn = 8)
  @limit = limit
  @error = error
  @warn = warn
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



597
598
599
# File 'lib/saikuro.rb', line 597

def error
  @error
end

#limitObject

Returns the value of attribute limit.



597
598
599
# File 'lib/saikuro.rb', line 597

def limit
  @limit
end

#warnObject

Returns the value of attribute warn.



597
598
599
# File 'lib/saikuro.rb', line 597

def warn
  @warn
end

Instance Method Details

#error?(count) ⇒ Boolean

Returns:

  • (Boolean)


613
614
615
# File 'lib/saikuro.rb', line 613

def error?(count)
  count >= @error
end

#ignore?(count) ⇒ Boolean

Returns:

  • (Boolean)


605
606
607
# File 'lib/saikuro.rb', line 605

def ignore?(count)
  count < @limit
end

#warn?(count) ⇒ Boolean

Returns:

  • (Boolean)


609
610
611
# File 'lib/saikuro.rb', line 609

def warn?(count)
  count >= @warn
end