Class: Soapstone::UI::Screens::Welcome

Inherits:
Object
  • Object
show all
Defined in:
lib/soapstone/ui/screens/welcome.rb

Constant Summary collapse

ART =
<<~ART
                                   -=-#
                           +=+::.::++*                  
                         -+*+*::.:+=++*                 
                        =:+***::=+*++==+*               
                        ::+##++*%#****#*+*              
                       %*#++***%%%#******##             
                       =+%#*+*###%*++**+=*+             
                      +=-==--=*#*====++==               
                     #++##*+-+***+***#*#                
                    %#**%#%==+**++*==**%                
                    ****#+:--=+#=+*+*%%@                
                   *+*#=:::-==+*#**#%%                  
                +==#%+::.-====++**#%                    
              +%@@+-:::.-=====+++*%                     
        *  *+ =%@=:::::-====-===+                       
   %*#*==---==% =.:::::==++====*                        
  #**++++%      :::::::====+=+                          
   %+   %      ::::::.:====+=                           
              ::::....--==+++                           
             :::::::::++++== @@@@@@@@@@
             :::::::.===++*@@@@@@@@@@@@@@@              
             .:--:::-==+++@@@@@@@@@@@@@@                
          @@@-::-:::=====%@@@@@@@@@@                    
             -.::::----+@@@@@@@                         
             %.:::--=%@@@@@@@                           
              ::-=%@@@@@@@                              
              +@@@@                                     
ART

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWelcome

Returns a new instance of Welcome.



39
40
41
# File 'lib/soapstone/ui/screens/welcome.rb', line 39

def initialize
  @pastel = Pastel.new
end

Class Method Details

.callObject



35
36
37
# File 'lib/soapstone/ui/screens/welcome.rb', line 35

def self.call
  new.call
end

Instance Method Details

#callObject



43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/soapstone/ui/screens/welcome.rb', line 43

def call
  Soapstone::UI::Screens::Utils.clear

  box = Soapstone::UI::Components::Box.call("Setup") { content }
  puts box

  Soapstone::UI::Prompts::Select.call(
    question: "",
    answers: answers,
    help: "Configuration options automatically saved to #{Soapstone::Config::Load::DEFAULT_CONFIG_FILE} \n"
  )
end