Class: PlaywrightRails::FindsBin
- Inherits:
-
Object
- Object
- PlaywrightRails::FindsBin
- Defined in:
- lib/playwright-rails/finds_bin.rb
Constant Summary collapse
- LOCAL_PATH =
"node_modules/.bin/playwright"
Instance Method Summary collapse
Instance Method Details
#call(dir = Dir.pwd) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/playwright-rails/finds_bin.rb', line 7 def call(dir = Dir.pwd) local_path = Pathname.new(dir).join(LOCAL_PATH) if File.exist?(local_path) local_path else "playwright" end end |