class Bean::Runner

Public Instance Methods

exec(name) click to toggle source
# File lib/bean/runner.rb, line 8
def exec(name)
  return init if name.to_s == 'init'
  run_bean(name)
end

Private Instance Methods

init() click to toggle source
# File lib/bean/runner.rb, line 22
    def init
      beanfile = Workspace::BEAN_FILE
      return puts "Beanfile already exist.".red if File.exist?(beanfile)

      File.open(beanfile, 'w') do |f|
        f.write <<-"..."
bean :dev do |c|
  c.workspace = 'YourWorkspace'
  c.scheme = 'Yourscheme'
end
        ...
      end
    end
run_bean(name) click to toggle source

exec then bean your defined in your own Beanfile.

# File lib/bean/runner.rb, line 16
def run_bean(name)
  bean_file = Workspace::BEAN_FILE
  return puts "Beanfile does not exist.".red unless Workspace.bean?
  Action::BeanAction.new(bean_file).run(name)
end