Sha256: cd264f2f88a4caacc7cd57508975a6cc0c5b8fcf0e74e64e9ed2630f084445b2

Contents?: true

Size: 733 Bytes

Versions: 7

Compression:

Stored size: 733 Bytes

Contents

#!/usr/bin/env ruby
require 'pry'
require 'menuboy'

@current_db = "identity"

include Menuboy::DSL

mainmenu "Main Menu" do
  option "start the stack" do
    if @started
      puts "Already started"
    else
      @started = true
      puts "Started!"
    end
  end

  submenu "database options" do
    puts "using #{@current_db}"

    submenu "change database" do
      option "identity" do
        @current_db = "identity"
        puts "using identity"
      end

      option "storage" do
        @current_db = "storage"
        puts "using storage"
      end
    end

    option "drop database" do
      puts "#{@current_db} dropped!"
    end

    option "seed database" do
      puts "#{@current_db} seeded!"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
menuboy-0.2.0 test/example.rb
menuboy-0.1.2 test/example.rb
menuboy-0.1.1 test/example.rb
menuboy-0.1.0 test/example.rb
menuboy-0.0.3 test/example.rb
menuboy-0.0.2 test/example.rb
menuboy-0.0.1 test/example.rb