Class: Yml2erd::SchemaStructure::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/yml2erd/schema_structure/validator.rb

Defined Under Namespace

Classes: InvalidKeyNameError, InvalidYmlStructureError

Constant Summary collapse

RELATIONS_KEY =
%w(belongs_to has_many)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(schema_structure) ⇒ Validator

Returns a new instance of Validator.



11
12
13
# File 'lib/yml2erd/schema_structure/validator.rb', line 11

def initialize(schema_structure)
  @ss = schema_structure
end

Instance Attribute Details

#ssObject (readonly)

Returns the value of attribute ss.



9
10
11
# File 'lib/yml2erd/schema_structure/validator.rb', line 9

def ss
  @ss
end

Instance Method Details

#validateObject



15
16
17
18
19
# File 'lib/yml2erd/schema_structure/validator.rb', line 15

def validate
  # relations
  columns
  keyname
end