Module: Elastic

Extended by:
Railties::Utils
Defined in:
lib/elastic/railtie.rb,
lib/elastic.rb,
lib/elastic/type.rb,
lib/elastic/query.rb,
lib/elastic/errors.rb,
lib/elastic/railtie.rb,
lib/elastic/version.rb,
lib/elastic/nested_type.rb,
lib/elastic/nested_query.rb,
lib/elastic/configuration.rb,
lib/generators/elastic/init_generator.rb,
lib/generators/elastic/index_generator.rb

Overview

Expose railties utils at Elastic namespace

Defined Under Namespace

Modules: Commands, Core, Datatypes, Dsl, Fields, Nodes, Railties, Results, Shims, Support, Types Classes: Configuration, Error, IndexGenerator, InitGenerator, MissingIndexError, NestedQuery, NestedType, Query, Railtie, RolloverError, Type

Constant Summary collapse

VERSION =
"1.0.4"

Class Method Summary collapse

Methods included from Railties::Utils

cleanup, drop, migrate, reindex, remap, stats

Class Method Details

.configObject



96
97
98
# File 'lib/elastic.rb', line 96

def self.config
  @config ||= Configuration.new
end

.configure(_options = nil, &_block) ⇒ Object



104
105
106
107
# File 'lib/elastic.rb', line 104

def self.configure(_options = nil, &_block)
  config.assign_attributes(_options) unless _options.nil?
  _block.call(config) unless _block.nil?
end

.loggerObject



100
101
102
# File 'lib/elastic.rb', line 100

def self.logger
  config.logger
end

.register_middleware(_middleware) ⇒ Object



109
110
111
# File 'lib/elastic.rb', line 109

def self.register_middleware(_middleware)
  Core::Middleware.register _middleware
end