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.
119 120 121 122 123 124 125 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 119 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.
117 118 119 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 117 def name @name end |
#not_null ⇒ Object (readonly)
Returns the value of attribute not_null.
117 118 119 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 117 def not_null @not_null end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
117 118 119 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 117 def type @type end |