lib/aequitas/rule/length/maximum.rb in aequitas-0.0.1 vs lib/aequitas/rule/length/maximum.rb in aequitas-0.0.2

- old
+ new

@@ -2,14 +2,14 @@ require 'aequitas/rule/length' module Aequitas class Rule - module Length - class Maximum < Rule + class Length + class Maximum < Length - include Length + equalize_on *superclass.superclass.equalizer.keys + [:bound] attr_reader :bound def initialize(attribute_name, options) super @@ -23,12 +23,10 @@ def violation_data(resource) [ [ :maximum, bound ] ] end - private - # Validate the value length is less than or equal to the bound # # @param [Integer] length # the value length # @@ -39,8 +37,8 @@ def valid_length?(length) bound >= length end end # class Maximum - end # module Length + end # class Length end # class Rule end # module Aequitas