Class: ActiveRecord::ConnectionAdapters::Elasticsearch::SchemaCreation
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::Elasticsearch::SchemaCreation
- 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
-
#connection ⇒ Object
readonly
:nodoc:.
Instance Method Summary collapse
- #accept(o) ⇒ Object
-
#initialize(connection) ⇒ SchemaCreation
constructor
A new instance of SchemaCreation.
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
#connection ⇒ Object (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 |