Class: ROM::Elasticsearch::IndexName Private

Inherits:
Object
  • Object
show all
Defined in:
lib/rom/elasticsearch/index_name.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ IndexName

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of IndexName.



21
22
23
24
# File 'lib/rom/elasticsearch/index_name.rb', line 21

def initialize(name)
  @name = name
  freeze
end

Instance Attribute Details

#nameObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
# File 'lib/rom/elasticsearch/index_name.rb', line 10

def name
  @name
end

Class Method Details

.[](name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
15
16
17
18
# File 'lib/rom/elasticsearch/index_name.rb', line 12

def self.[](name)
  if name.is_a?(self)
    name
  else
    new(name)
  end
end

Instance Method Details

#to_symObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



27
28
29
# File 'lib/rom/elasticsearch/index_name.rb', line 27

def to_sym
  name
end