Sha256: d09b6f35c61e78f0b0094ee79ebe36deef22901e4c27f85c4ddaaa315aa6494d
Contents?: true
Size: 282 Bytes
Versions: 1
Compression:
Stored size: 282 Bytes
Contents
# frozen_string_literal: true module Windcharger module HashTransformer def transform self.class.attributes.each_with_object({}) do |attribute, hash| hash[attribute] = public_send(attribute) end.freeze end alias_method :to_h, :transform end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
windcharger-0.4.0 | lib/windcharger/hash_transformer.rb |