Class: Cosmo::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/cosmo/cli.rb

Overview

rubocop:disable Metrics/ClassLength

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

rubocop:disable Layout/TrailingWhitespace,Lint/IneffectiveAccessModifier



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/cosmo/cli.rb', line 195

def self.banner
  <<-TEXT
                .#%+:                                                  
                 ==-.                                       +.         
                   +:  .::::.                              :*-         
                 .=%%%%%%%%%%%%%#-                                     
              .#%%%%%%%%##*+===+*#%%:                                  
            :##%%%%#:  :-::...::::. -%.                                
           +%%%**  :.             :+. -=.%:                         -  
          *%%%%: .-%%%#             ++ ---%.    -=                :==- 
          :%%%-  *%%%%               *- %:#+   =%%%.             .====:
      .%@%+.##.  #%%:                -+ =-=-    *%%:  .            :=  
      =*%%%=-#.                      :: =-:     *%-%%%%%#              
      .%=##* #-                         %.     :%%-+++%%%:             
       +=*+= +%.                      .*.   .=+.%%-#%%#*+:             
        ===: =*%=                   .*+  *%+%%% -%*:%%%%%:       .     
             =***%*.            .:#*:  .%%*+%%%#.+%+. .          =     
       -%#-:        -*########+   .:   +%%%=%%%*++:                    
    .##:---.  :%%-  *: +%%%%%%%%%%%##. -#%%*= =-                       
     *#:-: :%%%%+%%= --%%#. -#%%%%+=#-   =:            .:::::::::::::: 
     :#- =%%%%%%%+++. +*%=-%%%%#-..       ..:::::::::::::..            
        +***+:=***::  ==:.      ....::..                               
     -%%%%%+%%-         ....               .     +##%%=  .#%%%%%%%#.   
    .%%%%##=%%-               :+#%%%#. *%%%%+   -%%%%%= .%%%%%%%%%%%   
     -+--         -=#%#+:   +%%%%%%%#. *%%%%%+  #%%%%%= =%%%*   %%%%.  
       .-+###.  *%%%%%%%%+ -%%%%+.     *%%%%%%:*%%%%%%+ -%%%*   %%%%.  
    .*%%%%%%%  %%%%+.=%%%# =%%%%-      *%%%%%%%%%%*%%%+ -%%%*   %%%%.  
   =%%%%%#=:. :%%%#  .%%%#  #%%%%%%%:  +%%%-*%%%%:=%%%+ -%%%*   %%%%.  
  -%%%%-      .%%%#   %%%%    .#%%%%%= +%%%- #%%= -%%%+ -%%%*  .%%%%.  
  *%%%#       .%%%#.  %%%%       +%%%* +%%%-      -%%%+  #%%%###%%%*   
  %%%%*        %%%#.  #%%%..****#####- =###-      -###+   =######*.    
  #%%%#        #%%%*+*#%%* .########:  =#*=:                           
  +%%%%-   .=+ .########=   :----.           .:::--====++++********### 
  .#%#########:  :==-:          ..:--=====---::::..                    
   .########+.         .:--=--::.                                      
      :--.       .---:.                                                
             :.                                                        
  TEXT
end

.instanceObject



12
13
14
# File 'lib/cosmo/cli.rb', line 12

def self.instance
  @instance ||= new
end

.runObject



8
9
10
# File 'lib/cosmo/cli.rb', line 8

def self.run
  instance.run
end

Instance Method Details

#runObject



16
17
18
19
20
21
22
23
# File 'lib/cosmo/cli.rb', line 16

def run
  flags, command, options = parse
  load_config(flags)
  puts self.class.banner
  boot_application
  require_path(flags[:require])
  Engine.run(command, options)
end