Class: AgnosticBackend::Elasticsearch::RemoteIndexField
- Inherits:
-
Object
- Object
- AgnosticBackend::Elasticsearch::RemoteIndexField
- Defined in:
- lib/agnostic_backend/elasticsearch/remote_index_field.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type, **args) ⇒ RemoteIndexField
constructor
A new instance of RemoteIndexField.
- #method_missing(method_name) ⇒ Object
Constructor Details
#initialize(name, type, **args) ⇒ RemoteIndexField
Returns a new instance of RemoteIndexField.
8 9 10 11 12 |
# 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 |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
14 15 16 17 18 19 20 |
# 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 |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/agnostic_backend/elasticsearch/remote_index_field.rb', line 6 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/agnostic_backend/elasticsearch/remote_index_field.rb', line 6 def type @type end |