Class: Mycmd::ConfigCommands
- Inherits:
-
Thor
- Object
- Thor
- Mycmd::ConfigCommands
- Defined in:
- lib/mycmd/clis/config_commands.rb
Instance Method Summary collapse
Instance Method Details
#cat ⇒ Object
14 15 16 17 18 |
# File 'lib/mycmd/clis/config_commands.rb', line 14 def cat conf = Configuration.config_find raise "config not found" if conf.nil? open(conf, "r").each {|line| puts line} end |
#edit ⇒ Object
21 22 23 24 25 |
# File 'lib/mycmd/clis/config_commands.rb', line 21 def edit conf = Configuration.config_find raise "config not found" if conf.nil? system("#{ENV['EDITOR']} #{conf}") end |
#which ⇒ Object
8 9 10 11 |
# File 'lib/mycmd/clis/config_commands.rb', line 8 def which conf = Configuration.config_find puts conf.nil? ? "config not found" : conf end |