Class: Thrift::Types::Value::MapValue
- Inherits:
-
Object
- Object
- Thrift::Types::Value::MapValue
show all
- Includes:
- Struct, Struct_Union
- Defined in:
- lib/thrift/types/value/value.rb,
lib/thrift/types/value/value_types.rb,
lib/thrift/types/value/value_types.rb
Constant Summary
collapse
- NAME =
'MapValue'.freeze
- NAMESPACE =
'types.value'.freeze
- LEGACY_ANNOTATIONS =
{
}.freeze
- STRUCTURED_ANNOTATIONS =
[
].freeze
- THRIFT_FIELD_INDEX_ENTRIES =
1
- THRIFT_FIELD_ENTRIES_LEGACY_ANNOTATIONS =
{
}.freeze
- THRIFT_FIELD_ENTRIES_STRUCTURED_ANNOTATIONS =
[
].freeze
- FIELDS =
{
THRIFT_FIELD_INDEX_ENTRIES => {type: ::Thrift::Types::LIST, name: 'entries', element: {type: ::Thrift::Types::STRUCT, class: ::Thrift::Types::Value::MapEntry}, legacy_annotations: THRIFT_FIELD_ENTRIES_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_ENTRIES_STRUCTURED_ANNOTATIONS}
}
Struct_Union::CONTAINER_TYPES
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Struct
#<=>, #==, #differences, #eql?, field_accessor, #fields_with_default_values, generate_accessors, #hash, #initialize, #inspect, qmark_isset_method, #read, #write
#each_field, #field_info, #inspect_collection, #inspect_field, #is_container?, #name_to_id, #read_field, #sorted_field_ids, #write_container, #write_data
Instance Method Details
#struct_fields ⇒ Object
151
|
# File 'lib/thrift/types/value/value_types.rb', line 151
def struct_fields; FIELDS; end
|
#to_hash ⇒ Object
19
20
21
22
23
|
# File 'lib/thrift/types/value/value.rb', line 19
def to_hash
entries.reduce({}) do |acc, e|
acc.merge(e.key.to_object => e.value.to_object)
end
end
|