Class: ActiveRecord::ConnectionAdapters::Elasticsearch::Type::MulticastValue
- Inherits:
-
Type::Value
- Object
- Type::Value
- ActiveRecord::ConnectionAdapters::Elasticsearch::Type::MulticastValue
- Defined in:
- lib/active_record/connection_adapters/elasticsearch/type/multicast_value.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#nested_type ⇒ Object
readonly
Returns the value of attribute nested_type.
Instance Method Summary collapse
-
#deserialize(value) ⇒ Object?
overwrites the default deserialize behaviour.
-
#initialize(nested_type: nil) ⇒ MulticastValue
constructor
A new instance of MulticastValue.
- #type ⇒ Object
Constructor Details
#initialize(nested_type: nil) ⇒ MulticastValue
Returns a new instance of MulticastValue.
11 12 13 |
# File 'lib/active_record/connection_adapters/elasticsearch/type/multicast_value.rb', line 11 def initialize(nested_type: nil, **) @nested_type = nested_type || ActiveRecord::Type::Value.new end |
Instance Attribute Details
#nested_type ⇒ Object (readonly)
Returns the value of attribute nested_type.
9 10 11 |
# File 'lib/active_record/connection_adapters/elasticsearch/type/multicast_value.rb', line 9 def nested_type @nested_type end |
Instance Method Details
#deserialize(value) ⇒ Object?
overwrites the default deserialize behaviour
22 23 24 |
# File 'lib/active_record/connection_adapters/elasticsearch/type/multicast_value.rb', line 22 def deserialize(value) cast(_deserialize(value)) end |
#type ⇒ Object
15 16 17 |
# File 'lib/active_record/connection_adapters/elasticsearch/type/multicast_value.rb', line 15 def type nested_type.type end |