Sha256: 231c4a45351f4d5de0863580e7b197c94293abda7582438b51b316d1429c3040
Contents?: true
Size: 596 Bytes
Versions: 2
Compression:
Stored size: 596 Bytes
Contents
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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
amoeba-3.2.0 | lib/amoeba/class_methods.rb |
amoeba-3.1.0 | lib/amoeba/class_methods.rb |