Class: Protobuf::Field::BaseFieldObjectDefinitions::BoolFieldValueFromValuesForSerialization

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

Instance Method Summary collapse

Constructor Details

#initialize(selph) ⇒ BoolFieldValueFromValuesForSerialization

Returns a new instance of BoolFieldValueFromValuesForSerialization.



419
420
421
422
# File 'lib/protobuf/field/base_field_object_definitions.rb', line 419

def initialize(selph)
  @selph = selph
  @fully_qualified_name = selph.fully_qualified_name
end

Instance Method Details

#call(values) ⇒ Object



424
425
426
# File 'lib/protobuf/field/base_field_object_definitions.rb', line 424

def call(values)
  values.fetch(@fully_qualified_name) { @selph.default_value }
end