Class: Trains::Utils::RailsDir

Inherits:
Object
  • Object
show all
Defined in:
lib/trains/utils/rails_dir.rb

Class Method Summary collapse

Class Method Details

.check(root_path) ⇒ Object

checks if supplied dir is in a Rails app dir



5
6
7
8
9
# File 'lib/trains/utils/rails_dir.rb', line 5

def self.check(root_path)
  rails_bin = File.join(root_path, "bin", "rails")

  Result.new(data: File.exist?(rails_bin), error: nil)
end