Class: Playwright::CLI::Commands::Generate::Command
- Inherits:
-
Object
- Object
- Playwright::CLI::Commands::Generate::Command
- Includes:
- Utils::Ask, Utils::Display, Utils::FileManager
- Defined in:
- lib/playwright/cli/commands/generate/command.rb
Constant Summary collapse
- TEMPLATE_FILE =
'new_script.erb'.freeze
- PATH_BIN_DIR =
Pathname.new(File.join('/', 'usr', 'local', 'bin'))
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, type) ⇒ Command
constructor
A new instance of Command.
- #run ⇒ Object
Methods included from Utils::FileManager
Methods included from Utils::Ask
Methods included from Utils::Display
Constructor Details
#initialize(name, type) ⇒ Command
Returns a new instance of Command.
21 22 23 24 |
# File 'lib/playwright/cli/commands/generate/command.rb', line 21 def initialize(name, type) @name = name @type = type end |
Class Method Details
.run(name, type) ⇒ Object
17 18 19 |
# File 'lib/playwright/cli/commands/generate/command.rb', line 17 def self.run(name, type) new(name, type).run end |
Instance Method Details
#run ⇒ Object
26 27 28 |
# File 'lib/playwright/cli/commands/generate/command.rb', line 26 def run file_manager.install_script script_name: @name, type: @type end |