Class: Funicular::Model::Validations::EachValidator

Inherits:
Object
  • Object
show all
Defined in:
sig/validations.rbs

Overview

Base class for attribute validators.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeEachValidator

Returns a new instance of EachValidator.

Parameters:

  • attributes: (Array[Symbol])
  • options (Object)


33
# File 'sig/validations.rbs', line 33

def initialize: (attributes: Array[Symbol], **untyped options) -> void

Instance Attribute Details

#attributesArray[Symbol] (readonly)

Returns the value of attribute attributes.

Returns:

  • (Array[Symbol])


30
31
32
# File 'sig/validations.rbs', line 30

def attributes
  @attributes
end

#optionsHash[Symbol, untyped] (readonly)

Returns the value of attribute options.

Returns:

  • (Hash[Symbol, untyped])


31
32
33
# File 'sig/validations.rbs', line 31

def options
  @options
end

Instance Method Details

#blank?Boolean

Parameters:

  • value (Object)

Returns:

  • (Boolean)


39
# File 'sig/validations.rbs', line 39

def blank?: (untyped value) -> bool

#kindSymbol

Returns:

  • (Symbol)


34
# File 'sig/validations.rbs', line 34

def kind: () -> Symbol

#present?Boolean

Parameters:

  • value (Object)

Returns:

  • (Boolean)


40
# File 'sig/validations.rbs', line 40

def present?: (untyped value) -> bool

#validatevoid

This method returns an undefined value.

Parameters:

  • record (Object)


35
# File 'sig/validations.rbs', line 35

def validate: (untyped record) -> void

#validate_eachvoid

This method returns an undefined value.

Parameters:

  • record (Object)
  • attribute (Symbol)
  • value (Object)


36
# File 'sig/validations.rbs', line 36

def validate_each: (untyped record, Symbol attribute, untyped value) -> void