Class: GeneratedSchemaValidations::Table::ValidationWithoutEnum

Inherits:
Struct
  • Object
show all
Defined in:
lib/generated_schema_validations/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributeObject

Returns the value of attribute attribute

Returns:

  • (Object)

    the current value of attribute



10
11
12
# File 'lib/generated_schema_validations/table.rb', line 10

def attribute
  @attribute
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



10
11
12
# File 'lib/generated_schema_validations/table.rb', line 10

def options
  @options
end

#validatorObject

Returns the value of attribute validator

Returns:

  • (Object)

    the current value of validator



10
11
12
# File 'lib/generated_schema_validations/table.rb', line 10

def validator
  @validator
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/generated_schema_validations/table.rb', line 11

def to_s
  "validates_with_filter #{attribute.to_sym.inspect}, #{{ validator => options }.inspect} unless enums.include?(#{attribute.to_sym.inspect})"
end