From e62e1036eeeca9df7397f0dbd930ececc7297ec1 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Wed, 20 Sep 2017 17:11:27 +0200 Subject: Add the rest of compliance control models --- app/models/generic_attribute_pattern.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 app/models/generic_attribute_pattern.rb (limited to 'app/models/generic_attribute_pattern.rb') diff --git a/app/models/generic_attribute_pattern.rb b/app/models/generic_attribute_pattern.rb new file mode 100644 index 000000000..0043f1563 --- /dev/null +++ b/app/models/generic_attribute_pattern.rb @@ -0,0 +1,23 @@ +#module ComplianceControls + + class GenericAttributePattern < ComplianceControl + + hstore_accessor :control_attributes, value: :string, pattern: :string + + @@default_criticity = :warning + @@default_code = "3-Generic-3" + + validate :pattern_match + def pattern_match + true + end + + after_initialize do + self.name = 'GenericAttributeMinMax' + self.code = @@default_code + self.criticity = @@default_criticity + end + + end + +#end \ No newline at end of file -- cgit v1.2.3