Sha256: b1bd613db0b9d739366b4aeef33e5fd4266b8166cf1891690a975fda37bba64f
Contents?: true
Size: 380 Bytes
Versions: 4
Compression:
Stored size: 380 Bytes
Contents
# frozen_string_literal: true module RailsMiniProfiler module Models class BaseModel include ActiveModel::Model def initialize(*_args, **attributes) super(attributes) end def to_h instance_variables .each_with_object({}) { |var, hash| hash[var.to_s.delete('@')] = instance_variable_get(var) } end end end end
Version data entries
4 entries across 4 versions & 1 rubygems