Skip to content

Instantly share code, notes, and snippets.

@hajee
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hajee/8755069 to your computer and use it in GitHub Desktop.
Save hajee/8755069 to your computer and use it in GitHub Desktop.
c = CommandBuilder.new
c.default_command = :ls
c << "-als"
c << "a.a"
c.execute # ls -als a.a
line1 = CommandBuilder.new(:ls)
c << "-als"
c << "a.a"
c.execute # ls -als a.a
line2 = CommandBuilder.new(:ls)
c << "-als"
c << "a.a"
c.before
c.execute # ls -als a.a
script = ScriptBuilder.new
script << line1
script << line2
script = ScriptBuilder.new do
sql select * from tab where tabele_name = #{name}
end
script.before do
ls -als
end
script.after do
yum install #{resource.name}
end
script do
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment