module Dapp::Dimg::Dapp::Dimg
Public Instance Methods
artifact_dimg(config:, **kwargs)
click to toggle source
# File lib/dapp/dimg/dapp/dimg.rb, line 11 def artifact_dimg(config:, **kwargs) dimg_after_define_hook(config: config, **kwargs) do (@artifacts_dimgs ||= {})[config._name] ||= ::Dapp::Dimg::Artifact.new(config: config, dapp: self, **kwargs) end end
dimg(config:, **kwargs)
click to toggle source
# File lib/dapp/dimg/dapp/dimg.rb, line 5 def dimg(config:, **kwargs) dimg_after_define_hook(config: config, **kwargs) do (@dimg ||= {})[config._name] ||= ::Dapp::Dimg::Dimg.new(config: config, dapp: self, **kwargs) end end
dimg_after_define_hook(**kwargs) { || ... }
click to toggle source
# File lib/dapp/dimg/dapp/dimg.rb, line 17 def dimg_after_define_hook(**kwargs) should_be_built = kwargs[:should_be_built] || false yield.tap do |dimg| if should_be_built && dimg.should_be_built != should_be_built dimg.enable_should_be_built dimg.should_be_built! end