Class: Init
- Inherits:
-
Object
- Object
- Init
- Defined in:
- lib/envGen/init.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
- .help ⇒ Object
-
.init ⇒ Object
if not exist: write config directory and environment file.
- .usage ⇒ Object
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
3 4 5 |
# File 'lib/envGen/init.rb', line 3 def config @config end |
Class Method Details
.help ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/envGen/init.rb', line 9 def self.help usage puts "\nOPTIONS:" puts " init : Initialize environment.rb file" puts " file [file], [file] : Add file to environment, e.g. 'lib/test1.rb'" puts " dir [dir] : Add all .rb files in directory to environment" puts " gem [gem], [gem] : Add gem to environment using exact name" puts " gem -s [gem] : Search on partial gem name" puts " help : Display this message \n" end |
.init ⇒ Object
if not exist: write config directory and environment file
20 21 22 23 24 25 26 27 28 |
# File 'lib/envGen/init.rb', line 20 def self.init # if not exist: write config directory and environment file puts "INITIALIZING CONFIG/ENVIRONMENT.RB..." puts "\nChecking for 'config' directory:" self.config puts "\nChecking for 'config/environment.rb' file:" self.environment self.headers `atom config/environment.rb` end |
.usage ⇒ Object
5 6 7 |
# File 'lib/envGen/init.rb', line 5 def self.usage puts "\nUSAGE:\n envGen [option]" end |