Class: Protobuf::Field::BaseFieldObjectDefinitions::BaseToMessageHashWithStringKey

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

Instance Method Summary collapse

Constructor Details

#initialize(selph) ⇒ BaseToMessageHashWithStringKey

Returns a new instance of BaseToMessageHashWithStringKey.



17
18
19
20
# File 'lib/protobuf/field/base_field_object_definitions.rb', line 17

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

Instance Method Details

#call(values, result) ⇒ Object



22
23
24
# File 'lib/protobuf/field/base_field_object_definitions.rb', line 22

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