Class: Spring::Client::Stop

Inherits:
Command
  • Object
show all
Defined in:
lib/spring/client/stop.rb

Instance Attribute Summary

Attributes inherited from Command

#args, #env

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

call, #initialize

Constructor Details

This class inherits a constructor from Spring::Client::Command

Class Method Details

.descriptionObject



6
7
8
# File 'lib/spring/client/stop.rb', line 6

def self.description
  "Stop all spring processes for this project."
end

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/spring/client/stop.rb', line 10

def call
  case env.stop
  when :stopped
    puts "Spring stopped."
  when :killed
    $stderr.puts "Spring did not stop; killing forcibly."
  when :not_running
    puts "Spring is not running"
  end
end