module DkComposer::Helper

Attributes

build_path[RW]
longdesc[RW]
shortdesc[RW]

Public Instance Methods

config(**opts) click to toggle source
# File lib/dkcomposer/helper.rb, line 4
def config(**opts)
  opts.each do |(key, value)|
    if value.is_a?(Array)
      send(key, *value)
    else
      send(key, value)
    end
  end
end
deep_clone() click to toggle source
# File lib/dkcomposer/helper.rb, line 22
def deep_clone
  Marshal.load(Marshal.dump(self))
end

Private Instance Methods

run_command(command) click to toggle source
# File lib/dkcomposer/helper.rb, line 39
def run_command(command)
  system(command)
end
tempfile(content, *opts) click to toggle source
# File lib/dkcomposer/helper.rb, line 32
def tempfile(content, *opts)
  tempfile = Tempfile.new(*opts)
  tempfile.write(content)
  tempfile.rewind
  tempfile.path.split('/').last
end