class Object

Public Instance Methods

installed?(process) click to toggle source
# File lib/generators/react_on_rails/bin/dev, line 4
def installed?(process)
  IO.popen "#{process} -v"
rescue Errno::ENOENT
  false
end
run(process) click to toggle source
# File lib/generators/react_on_rails/bin/dev, line 10
def run(process)
  system "#{process} start -f Procfile.dev"
rescue Errno::ENOENT
  warn <<~MSG
    ERROR:
    Please ensure `Procfile.dev` exists in your project!
  MSG
  exit!
end