class AgnosticBackend::Elasticsearch::RemoteIndexField

Attributes

name[R]
type[R]

Public Class Methods

new(name, type, **args) click to toggle source
# File lib/agnostic_backend/elasticsearch/remote_index_field.rb, line 8
def initialize(name, type, **args)
  @name = name
  @type = to_local type
  @options = args
end

Public Instance Methods

method_missing(method_name) click to toggle source
Calls superclass method
# File lib/agnostic_backend/elasticsearch/remote_index_field.rb, line 14
def method_missing(method_name)
  if @options.has_key? method_name
    @options[method_name]
  else
    super
  end
end

Private Instance Methods

to_local(remote_type) click to toggle source
# File lib/agnostic_backend/elasticsearch/remote_index_field.rb, line 24
def to_local(remote_type)
  AgnosticBackend::Elasticsearch::IndexField::TYPE_MAPPINGS.find{|ltype, rtype| remote_type == rtype}.try(:first)
end