Class: ActiveRecord::ConnectionAdapters::Elasticsearch::SchemaCreation

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/connection_adapters/elasticsearch/schema_creation.rb

Overview

this class is totally refactored from the original and acts here as "wrapper"

  • to support rails backwards compatibility on the +#schema_creation+ method

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ SchemaCreation

Returns a new instance of SchemaCreation.



12
13
14
# File 'lib/active_record/connection_adapters/elasticsearch/schema_creation.rb', line 12

def initialize(connection)
  @connection = connection
end

Instance Attribute Details

#connectionObject (readonly)

:nodoc:



10
11
12
# File 'lib/active_record/connection_adapters/elasticsearch/schema_creation.rb', line 10

def connection
  @connection
end

Instance Method Details

#accept(o) ⇒ Object



16
17
18
19
20
# File 'lib/active_record/connection_adapters/elasticsearch/schema_creation.rb', line 16

def accept(o)
  visitor.dispatch_as(:simple) do
    visitor.compile(o)
  end
end