Class: Mimi::DB::Dictate::SchemaDefinition::Index
- Inherits:
-
Object
- Object
- Mimi::DB::Dictate::SchemaDefinition::Index
- Defined in:
- lib/mimi/db/dictate/schema_definition.rb
Overview
Represents an index in schema definition
Constant Summary collapse
- DEFAULTS =
{ unique: false }.freeze
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(columns, params) ⇒ Index
constructor
Creates an Index object.
- #to_h ⇒ Object
Constructor Details
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
142 143 144 |
# File 'lib/mimi/db/dictate/schema_definition.rb', line 142 def columns @columns end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
142 143 144 |
# File 'lib/mimi/db/dictate/schema_definition.rb', line 142 def name @name end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
142 143 144 |
# File 'lib/mimi/db/dictate/schema_definition.rb', line 142 def params @params end |
Instance Method Details
#to_h ⇒ Object
155 156 157 158 159 160 161 |
# File 'lib/mimi/db/dictate/schema_definition.rb', line 155 def to_h { name: name, columns: columns, params: params.dup } end |