class AgnosticBackend::Cloudsearch::RemoteIndexField

Attributes

field[R]
status[R]

Public Class Methods

new(remote_field_struct) click to toggle source
# File lib/agnostic_backend/cloudsearch/remote_index_field.rb, line 17
def initialize(remote_field_struct)
  @field = remote_field_struct.options
  @status = remote_field_struct.status
end
partition(local_fields, remote_fields) click to toggle source

returns an array with two elements: the first is an array with the remote fields that correspond to local fields the second is an array with the remote that do not have corresponding local fields

# File lib/agnostic_backend/cloudsearch/remote_index_field.rb, line 10
def self.partition(local_fields, remote_fields)
  local_field_names = local_fields.map(&:name)
  remote_fields.partition do |remote_field|
    local_field_names.include? remote_field.index_field_name
  end
end

Public Instance Methods

method_missing(method_name) click to toggle source
Calls superclass method
# File lib/agnostic_backend/cloudsearch/remote_index_field.rb, line 22
def method_missing(method_name)
  if field.respond_to?(method_name)
    field.send(method_name)
  else
    super
  end
end