Module: Elastics::ActiveModel
- Defined in:
- lib/elastics/active_model.rb,
lib/elastics/active_model/storage.rb,
lib/elastics/active_model/attachment.rb,
lib/elastics/active_model/inspection.rb,
lib/elastics/active_model/timestamps.rb
Defined Under Namespace
Modules: Attachment, Inspection, Storage, Timestamps
Classes: DocumentInvalidError
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
46
47
48
|
# File 'lib/elastics/active_model.rb', line 46
def method_missing(meth, *args, &block)
raw_document.respond_to?(meth) ? raw_document.send(meth) : super
end
|
Instance Attribute Details
#_id ⇒ Object
Also known as:
id
Returns the value of attribute _id.
4
5
6
|
# File 'lib/elastics/active_model.rb', line 4
def _id
@_id
end
|
#_version ⇒ Object
Returns the value of attribute _version.
4
5
6
|
# File 'lib/elastics/active_model.rb', line 4
def _version
@_version
end
|
#highlight ⇒ Object
Returns the value of attribute highlight.
4
5
6
|
# File 'lib/elastics/active_model.rb', line 4
def highlight
@highlight
end
|
Instance Method Details
#elastics ⇒ Object
30
31
32
|
# File 'lib/elastics/active_model.rb', line 30
def elastics
@elastics ||= InstanceProxy::ActiveModel.new(self)
end
|
#elastics_action ⇒ Object
42
43
44
|
# File 'lib/elastics/active_model.rb', line 42
def elastics_action
'index'
end
|
#elastics_indexable? ⇒ Boolean
38
39
40
|
# File 'lib/elastics/active_model.rb', line 38
def elastics_indexable?
true
end
|
#elastics_source ⇒ Object
34
35
36
|
# File 'lib/elastics/active_model.rb', line 34
def elastics_source
attributes
end
|