Class: Mutx::Base
- Inherits:
-
Thor
- Object
- Thor
- Mutx::Base
- Defined in:
- lib/mutx.rb
Instance Method Summary collapse
- #bye ⇒ Object
- #create_alert(name) ⇒ Object
- #install ⇒ Object
- #reset ⇒ Object
- #reset_tasks ⇒ Object
- #restart ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Instance Method Details
#bye ⇒ Object
72 73 74 75 76 |
# File 'lib/mutx.rb', line 72 def bye if yes? "Are you sure to say bye to Mutx? (yes/no)" Mutx::Commands.bye end end |
#create_alert(name) ⇒ Object
67 68 69 |
# File 'lib/mutx.rb', line 67 def create_alert(name) Mutx::Commands.create_alert(name) end |
#install ⇒ Object
29 30 31 |
# File 'lib/mutx.rb', line 29 def install Mutx::Commands.install end |
#reset ⇒ Object
55 56 57 58 59 |
# File 'lib/mutx.rb', line 55 def reset if yes? "Are you sure to reset all register? (yes/no)" Mutx::Commands.reset end end |
#reset_tasks ⇒ Object
62 63 64 |
# File 'lib/mutx.rb', line 62 def reset_tasks Mutx::Commands.reset_tasks end |
#restart ⇒ Object
50 51 52 |
# File 'lib/mutx.rb', line 50 def restart Mutx::Commands.restart end |
#start ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/mutx.rb', line 35 def start if Dir.exist? "#{Dir.pwd}/mutx" Mutx::Support::Log.start Mutx::Commands.start(["nodemon"]) else puts "Could not find mutx folder on root project folder. You can use `mutx install`".red end end |
#stop ⇒ Object
45 46 47 |
# File 'lib/mutx.rb', line 45 def stop Mutx::Commands.stop end |