Skip to content

Instantly share code, notes, and snippets.

@spikegrobstein
Created November 16, 2012 16:13
Show Gist options
  • Save spikegrobstein/4088602 to your computer and use it in GitHub Desktop.
Save spikegrobstein/4088602 to your computer and use it in GitHub Desktop.
Comparing benzo to cocaine
line = Benzo.line('createdb',
'-E :encoding' => @encoding,
'-O :owner' => @owner,
'-T :template' => @template,
':db_name' => @database )
opts = []
opts << '-E :encoding' if @encoding
opts << '-O :owner' if @owner
opts << '-T :template' if @template
opts << ':db_name'
line = Cocaine::CommandLine.new('createdb',
opts.join(' '),
:encoding => @encoding,
:owner => @owner,
:template => @template,
:db_name => @database )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment