class EnvGen
Public Class Methods
dir()
click to toggle source
# File lib/envGen.rb, line 13 def self.dir ARGV.delete_at(0) # gets rid of "dir" to isolate dir to add AddFile.dir(ARGV.first) # adds Ruby files in specified directory end
file()
click to toggle source
# File lib/envGen.rb, line 8 def self.file ARGV.delete_at(0) # gets rid of "file" to isolate files to add AddFile.multiple(ARGV) # adds files individually end
newGem()
click to toggle source
# File lib/envGen.rb, line 18 def self.newGem ARGV.delete_at(0) # gets rid of "gem" to isolate gems to add if ARGV[0] == "-s" # kicks off search new_gem = AddGem.new(ARGV[1]) new_gem.gemSearch # searches for gem specified else ARGV.each do |arg| new_gem = AddGem.new(arg) # creates objects for each gem new_gem.gemEntry end end end
parse(input)
click to toggle source
# File lib/envGen.rb, line 31 def self.parse(input) # handles user input from executable, ARGV[0] if !@@options.include?(input) puts "invalid command" else case input when "init" Init.init # handles environment creation when "file" file when "dir" dir when "gem" newGem when "help" Init.help # displays help message end end end