Sha256: 5ddc6c6fd038444d1da60cd267e23b52424075535e831e6d6076a2eb259ecabd
Contents?: true
Size: 568 Bytes
Versions: 7
Compression:
Stored size: 568 Bytes
Contents
# frozen_string_literal: true module Micro::Attributes module Features module Initialize def self.included(base) base.class_eval(<<-RUBY) def initialize(arg) self.attributes = arg __call_after_micro_attribute end RUBY end def with_attribute(key, val) self.class.new(attributes.merge(key => val)) end def with_attributes(arg) self.class.new(attributes.merge(arg)) end private def __call_after_micro_attribute; end end end end
Version data entries
7 entries across 7 versions & 1 rubygems