Class: CLI::Install

Inherits:
Object
  • Object
show all
Defined in:
lib/what_is_this/Install.rb

Constant Summary collapse

@@spacing =
"\n\n\n"
@@message_spacing =
"         "

Class Method Summary collapse

Class Method Details

.installObject



5
6
7
8
9
# File 'lib/what_is_this/Install.rb', line 5

def self.install
    puts @@spacing + @@message_spacing + "Enter the gem that you would like to install and save as a dependency"
    input = CGI.escape(gets.chomp)
    self.run_sys_command(input)
end

.run_sys_command(input) ⇒ Object



10
11
12
13
14
# File 'lib/what_is_this/Install.rb', line 10

def self.run_sys_command(input)
    system("bundle add #{input}") 
    puts @@spacing + @@message_spacing + "Gem installed!"

end