Class: RuboCop::Rails::SchemaLoader::Column
- Inherits:
-
Object
- Object
- RuboCop::Rails::SchemaLoader::Column
- Defined in:
- lib/rubocop/rails/schema_loader/schema.rb
Overview
Represent a column
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#not_null ⇒ Object
readonly
Returns the value of attribute not_null.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(node) ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(node) ⇒ Column
Returns a new instance of Column.
120 121 122 123 124 125 126 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 120 def initialize(node) @name = node.first_argument.str_content @type = node.method_name @not_null = nil analyze_keywords!(node) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
118 119 120 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 118 def name @name end |
#not_null ⇒ Object (readonly)
Returns the value of attribute not_null.
118 119 120 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 118 def not_null @not_null end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
118 119 120 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 118 def type @type end |