Class: RuboCop::Rails::SchemaLoader::Index
- Inherits:
-
Object
- Object
- RuboCop::Rails::SchemaLoader::Index
- Defined in:
- lib/rubocop/rails/schema_loader/schema.rb
Overview
Represent an index
Direct Known Subclasses
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#unique ⇒ Object
readonly
Returns the value of attribute unique.
Instance Method Summary collapse
-
#initialize(node) ⇒ Index
constructor
A new instance of Index.
Constructor Details
#initialize(node) ⇒ Index
Returns a new instance of Index.
144 145 146 147 148 149 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 144 def initialize(node) @columns, @expression = build_columns_or_expr(node.first_argument) @unique = nil analyze_keywords!(node) end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
142 143 144 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 142 def columns @columns end |
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
142 143 144 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 142 def expression @expression end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
142 143 144 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 142 def name @name end |
#unique ⇒ Object (readonly)
Returns the value of attribute unique.
142 143 144 |
# File 'lib/rubocop/rails/schema_loader/schema.rb', line 142 def unique @unique end |