Class: TableInspector::ModelValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/table_inspector/model_validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ ModelValidator

Returns a new instance of ModelValidator.



6
7
8
# File 'lib/table_inspector/model_validator.rb', line 6

def initialize(klass)
  @klass = klass
end

Instance Attribute Details

#klassObject

Returns the value of attribute klass.



4
5
6
# File 'lib/table_inspector/model_validator.rb', line 4

def klass
  @klass
end

Instance Method Details

#validate!Object



10
11
12
13
14
15
# File 'lib/table_inspector/model_validator.rb', line 10

def validate!
  return true if is_model_class?

  puts not_a_model_class_hint
  false
end