Class: TableSync::Utils::Schema::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/table_sync/utils/schema/validator.rb,
lib/table_sync/utils/schema/validator/type.rb

Defined Under Namespace

Classes: Type

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ Validator

Returns a new instance of Validator.



9
10
11
# File 'lib/table_sync/utils/schema/validator.rb', line 9

def initialize(type)
  @type = type
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



7
8
9
# File 'lib/table_sync/utils/schema/validator.rb', line 7

def type
  @type
end

Instance Method Details

#inspectObject



17
18
19
# File 'lib/table_sync/utils/schema/validator.rb', line 17

def inspect
  type.inspect
end

#validate(value) ⇒ Object



13
14
15
# File 'lib/table_sync/utils/schema/validator.rb', line 13

def validate(value)
  type.validate(value)
end