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.



586
587
588
589
590
# File 'lib/saikuro.rb', line 586

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.



584
585
586
# File 'lib/saikuro.rb', line 584

def error
  @error
end

#limitObject

Returns the value of attribute limit.



584
585
586
# File 'lib/saikuro.rb', line 584

def limit
  @limit
end

#warnObject

Returns the value of attribute warn.



584
585
586
# File 'lib/saikuro.rb', line 584

def warn
  @warn
end

Instance Method Details

#error?(count) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#ignore?(count) ⇒ Boolean

Returns:

  • (Boolean)


592
593
594
# File 'lib/saikuro.rb', line 592

def ignore?(count)
  count < @limit
end

#warn?(count) ⇒ Boolean

Returns:

  • (Boolean)


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

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