Class: TableSync::Utils::Schema::Validator
- Inherits:
-
Object
- Object
- TableSync::Utils::Schema::Validator
- 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
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type) ⇒ Validator
constructor
A new instance of Validator.
- #inspect ⇒ Object
- #validate(value) ⇒ Object
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
#type ⇒ Object (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
#inspect ⇒ Object
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 |