Class: Junction::Screens::Main

Inherits:
Screen
  • Object
show all
Defined in:
lib/junction/screens/main.rb

Instance Attribute Summary

Attributes inherited from Screen

#prompt

Instance Method Summary collapse

Methods inherited from Screen

#initialize

Constructor Details

This class inherits a constructor from Junction::Screens::Screen

Instance Method Details

#renderObject



6
7
8
9
10
11
12
13
# File 'lib/junction/screens/main.rb', line 6

def render
  prompt.say('Welcome to the Junction CLI!')
  prompt.say('Please select an option:')
  prompt.select('Options:') do |menu|
    menu.choice 'Create a new project', -> { create_project }
    menu.choice 'Exit', -> { exit }
  end
end