Method: Spring::Client::Binstub::Item#initialize

Defined in:
lib/spring/client/binstub.rb

#initialize(command) ⇒ Item

Returns a new instance of Item.



55
56
57
58
59
60
61
62
63
64
# File 'lib/spring/client/binstub.rb', line 55

def initialize(command)
  @command = command

  if command.binstub.exist?
    @existing = command.binstub.read
  elsif command.name == "rails"
    scriptfile = Spring.application_root_path.join("script/rails")
    @existing = scriptfile.read if scriptfile.exist?
  end
end