Method: ContractValueObject#to_h

Defined in:
lib/contract_value_object.rb

#to_hObject



98
99
100
101
102
103
104
# File 'lib/contract_value_object.rb', line 98

def to_h
  key_value_pairs = self.class.attributes.map do |attribute, _type|
    [attribute, public_send(attribute)]
  end

  key_value_pairs.to_h
end