Class: Protobuf::Field::BaseFieldObjectDefinitions::ToHashValueToMessageHashWithStringKey

Inherits:
Object
  • Object
show all
Defined in:
lib/protobuf/field/base_field_object_definitions.rb

Instance Method Summary collapse

Constructor Details

#initialize(selph) ⇒ ToHashValueToMessageHashWithStringKey

Returns a new instance of ToHashValueToMessageHashWithStringKey.



6
7
8
9
# File 'lib/protobuf/field/base_field_object_definitions.rb', line 6

def initialize(selph)
  @selph = selph
  @name = selph.name.to_s
end

Instance Method Details

#call(values, result) ⇒ Object



11
12
13
# File 'lib/protobuf/field/base_field_object_definitions.rb', line 11

def call(values, result)
  result[@name] = @selph.value_from_values(values).to_hash_value
end