Class: TableInspector::ColumnValidator
- Inherits:
-
Object
- Object
- TableInspector::ColumnValidator
- Defined in:
- lib/table_inspector/column_validator.rb
Instance Attribute Summary collapse
-
#column_name ⇒ Object
Returns the value of attribute column_name.
-
#klass ⇒ Object
Returns the value of attribute klass.
Instance Method Summary collapse
-
#initialize(klass, column_name) ⇒ ColumnValidator
constructor
A new instance of ColumnValidator.
- #validate! ⇒ Object
Constructor Details
#initialize(klass, column_name) ⇒ ColumnValidator
Returns a new instance of ColumnValidator.
6 7 8 9 |
# File 'lib/table_inspector/column_validator.rb', line 6 def initialize(klass, column_name) @klass = klass @column_name = column_name end |
Instance Attribute Details
#column_name ⇒ Object
Returns the value of attribute column_name.
4 5 6 |
# File 'lib/table_inspector/column_validator.rb', line 4 def column_name @column_name end |
#klass ⇒ Object
Returns the value of attribute klass.
4 5 6 |
# File 'lib/table_inspector/column_validator.rb', line 4 def klass @klass end |
Instance Method Details
#validate! ⇒ Object
11 12 13 14 15 16 |
# File 'lib/table_inspector/column_validator.rb', line 11 def validate! return true if column_exists? puts column_is_not_exists_hint false end |