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