Class: ActiveRecord::ConnectionAdapters::Elasticsearch::TableAliasDefinition

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations, AttributeMethods
Defined in:
lib/active_record/connection_adapters/elasticsearch/schema_definitions/table_alias_definition.rb

Constant Summary collapse

ATTRIBUTES =
[:filter, :index_routing, :is_hidden, :is_write_index, :routing, :search_routing].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, attributes) ⇒ TableAliasDefinition

Returns a new instance of TableAliasDefinition.



25
26
27
28
# File 'lib/active_record/connection_adapters/elasticsearch/schema_definitions/table_alias_definition.rb', line 25

def initialize(name, attributes)
  self.name       = name.to_sym
  self.attributes = attributes.symbolize_keys
end

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



19
20
21
# File 'lib/active_record/connection_adapters/elasticsearch/schema_definitions/table_alias_definition.rb', line 19

def attributes
  @attributes
end

#nameObject

attributes



18
19
20
# File 'lib/active_record/connection_adapters/elasticsearch/schema_definitions/table_alias_definition.rb', line 18

def name
  @name
end

#stateObject (readonly) Originally defined in module AttributeMethods

Returns the value of attribute state.

Instance Method Details

#error_messagesObject Originally defined in module AttributeMethods

#state?Boolean Originally defined in module AttributeMethods

Returns:

  • (Boolean)

#with_state(state) ⇒ Object Originally defined in module AttributeMethods