Class: Convergence::Index

Inherits:
Object
  • Object
show all
Defined in:
lib/convergence/index.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index_name, index_columns, options) ⇒ Index

Returns a new instance of Index.



4
5
6
7
8
# File 'lib/convergence/index.rb', line 4

def initialize(index_name, index_columns, options)
  @index_name = index_name
  @index_columns = [index_columns].flatten.map(&:to_s)
  @options = { name: @index_name }.merge(options)
end

Instance Attribute Details

#index_columnsObject

Returns the value of attribute index_columns.



2
3
4
# File 'lib/convergence/index.rb', line 2

def index_columns
  @index_columns
end

#index_nameObject

Returns the value of attribute index_name.



2
3
4
# File 'lib/convergence/index.rb', line 2

def index_name
  @index_name
end

#optionsObject

Returns the value of attribute options.



2
3
4
# File 'lib/convergence/index.rb', line 2

def options
  @options
end