class Tempo::Controllers::Checkout

Public Class Methods

add_project(options, args) click to toggle source
# File lib/tempo/controllers/checkout_controller.rb, line 8
def add_project(options, args)
  request = reassemble_the args, options[:add]

  if @projects.include? request
    Views::already_exists_error "project", request

  else
    project = @projects.new({ title: request, current: true })
    @projects.save_to_file options
    Views::project_checkout project
  end
end
assistance() click to toggle source
# File lib/tempo/controllers/checkout_controller.rb, line 36
def assistance
  Views::checkout_assistance
end
existing_project(options, args) click to toggle source
# File lib/tempo/controllers/checkout_controller.rb, line 21
def existing_project(options, args)

  match = match_project :checkout, options, args

  if match
    if @projects.current == match
      Views::project_already_current match
    else
      @projects.current = match
      @projects.save_to_file options
      Views::project_checkout match
    end
  end
end