Sha256: 9e2b59b85cbd885defd1e74619523e4483ca277126a030f9dbb9e24fb44a47fb
Contents?: true
Size: 627 Bytes
Versions: 1
Compression:
Stored size: 627 Bytes
Contents
# frozen_string_literal: true module Amoeba module ClassMethods def amoeba(&block) @config_block ||= block if block_given? @config ||= Amoeba::Config.new(self) @config.instance_eval(&block) if block_given? @config end def fresh_amoeba(&block) @config_block = block if block_given? @config = Amoeba::Config.new(self) @config.instance_eval(&block) if block_given? @config end def reset_amoeba(&block) @config_block = block if block_given? @config = Amoeba::Config.new(self) end def amoeba_block @config_block end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
amoeba-3.3.0 | lib/amoeba/class_methods.rb |