Class: Cylons::RemoteSchema

Inherits:
Object
  • Object
show all
Defined in:
lib/cylons/remote_schema.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ RemoteSchema

Returns a new instance of RemoteSchema.



5
6
7
8
9
10
# File 'lib/cylons/remote_schema.rb', line 5

def initialize(klass)
  @remote_attributes ||= klass.attribute_names
  @remote_associations ||= klass.remote_associations
  @remote_search_scopes ||= []
  @remote_klass ||= klass.name.downcase.to_sym
end

Instance Attribute Details

#remote_associationsObject

Returns the value of attribute remote_associations.



3
4
5
# File 'lib/cylons/remote_schema.rb', line 3

def remote_associations
  @remote_associations
end

#remote_attributesObject

Returns the value of attribute remote_attributes.



3
4
5
# File 'lib/cylons/remote_schema.rb', line 3

def remote_attributes
  @remote_attributes
end

#remote_klassObject

Returns the value of attribute remote_klass.



3
4
5
# File 'lib/cylons/remote_schema.rb', line 3

def remote_klass
  @remote_klass
end

#remote_search_scopesObject

Returns the value of attribute remote_search_scopes.



3
4
5
# File 'lib/cylons/remote_schema.rb', line 3

def remote_search_scopes
  @remote_search_scopes
end