class SiteHook::Prompts::Project

Public Instance Methods

prompt_name() click to toggle source
# File lib/site_hook/prompts/prompt_project.rb, line 20
      def prompt_name
        @@hl.say(<<~STATEMENT)
          What's the name of the project?
        STATEMENT
        @@hl.choose do |menu|
          menu.confirm   = 'Are you sure? '
          menu.select_by = :index_or_name
          menu.index     = '*'
          menu.prompt    = '> '
          menu.flow      = :rows
          menu.default   = Pathname.new(`pwd`).basename.to_s.chomp!
          menu.choice(Pathname.new(`pwd`).basename.to_s.chomp!) do |answer|
            @project_name = answer
          end
          menu.choice('Custom / Input your own?') do
            @project_name = @@hl.ask('> ', String) do |q|
              q.confirm = true
            end
          end
        end
      end
prompt_src_path() click to toggle source
# File lib/site_hook/prompts/prompt_project.rb, line 41
      def prompt_src_path
        @@hl.say(<<~STATEMENT)
        What's the src path?
        STATEMENT
      end