class RBT::Cookbooks::CreateSqlFromThisCookbook

Public Class Methods

[](i = ARGV) click to toggle source
#

RBT::Cookbook::CreateSqlFromThisCookbook[]

#
# File lib/rbt/sql/create_sql_from_this_cookbook.rb, line 65
def self.[](i = ARGV)
  new(i)
end
new( i = ARGV, run_already = true ) click to toggle source
#

initialize

#
# File lib/rbt/sql/create_sql_from_this_cookbook.rb, line 30
def initialize(
    i           = ARGV,
    run_already = true
  )
  reset
  set_commandline_arguments(i)
  run if run_already
end

Public Instance Methods

reset() click to toggle source
#

reset (reset tag)

#
Calls superclass method RBT::LeanPrototype#reset
# File lib/rbt/sql/create_sql_from_this_cookbook.rb, line 42
def reset
  super()
  @_ = ''.dup # Our main String.
  @_ << 'CREATE TABLE cookbooks (
    PersonID int,
    program_name varchar(255),
    base_dir varchar(255),
    prefix varchar(255),
    licence varchar(255)
  );'
end
run() click to toggle source
#

run (run tag)

#
# File lib/rbt/sql/create_sql_from_this_cookbook.rb, line 57
def run
  e steelblue('This is fairly unfinished - we need to first map')
  e steelblue('all entries to a corresponding SQL entry.')
end