Class: GeneratedSchemaValidations::Table::Validation

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



4
5
6
# File 'lib/generated_schema_validations/table.rb', line 4

def attribute
  @attribute
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



4
5
6
# File 'lib/generated_schema_validations/table.rb', line 4

def options
  @options
end

#validatorObject

Returns the value of attribute validator

Returns:

  • (Object)

    the current value of validator



4
5
6
# File 'lib/generated_schema_validations/table.rb', line 4

def validator
  @validator
end

Instance Method Details

#to_sObject



5
6
7
# File 'lib/generated_schema_validations/table.rb', line 5

def to_s
  "validates_with_filter #{attribute.to_sym.inspect}, #{{ validator => options }.inspect}"
end