Sha256: e5e4c71754da0fcda64fcee29a291f894e64839167fdb6b809e42ebe335bdff3
Contents?: true
Size: 276 Bytes
Versions: 5
Compression:
Stored size: 276 Bytes
Contents
# frozen_string_literal: true module DecoLite # Provides methods to convert the object to a Hash. module Hashable def to_h field_names.each.each_with_object({}) do |field_name, hash| hash[field_name] = public_send field_name end end end end
Version data entries
5 entries across 5 versions & 1 rubygems