Class: ThresholdViolation

Inherits:
Struct
  • Object
show all
Defined in:
lib/cane/threshold_violation.rb

Overview

Value object used by ThresholdCheck.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#limitObject

Returns the value of attribute limit

Returns:

  • (Object)

    the current value of limit



2
3
4
# File 'lib/cane/threshold_violation.rb', line 2

def limit
  @limit
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



2
3
4
# File 'lib/cane/threshold_violation.rb', line 2

def name
  @name
end

#operatorObject

Returns the value of attribute operator

Returns:

  • (Object)

    the current value of operator



2
3
4
# File 'lib/cane/threshold_violation.rb', line 2

def operator
  @operator
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



2
3
4
# File 'lib/cane/threshold_violation.rb', line 2

def value
  @value
end

Instance Method Details

#columnsObject



7
8
9
10
11
12
13
14
# File 'lib/cane/threshold_violation.rb', line 7

def columns
  ["%s is %s, should be %s %s" % [
    name,
    value,
    operator,
    limit
  ]]
end

#descriptionObject



3
4
5
# File 'lib/cane/threshold_violation.rb', line 3

def description
  "Quality threshold crossed"
end