Class: Playwright::CLI
- Inherits:
-
Hanami::CLI
show all
- Defined in:
- lib/playwright/cli.rb,
lib/playwright/cli/utils.rb,
lib/playwright/cli/command.rb,
lib/playwright/cli/version.rb,
lib/playwright/cli/commands.rb,
lib/playwright/cli/registry.rb,
lib/playwright/cli/template.rb,
lib/playwright/cli/utils/os.rb,
lib/playwright/cli/utils/ask.rb,
lib/playwright/cli/utils/util.rb,
lib/playwright/cli/commands/edit.rb,
lib/playwright/cli/commands/list.rb,
lib/playwright/cli/configuration.rb,
lib/playwright/cli/utils/display.rb,
lib/playwright/cli/commands/destroy.rb,
lib/playwright/cli/commands/version.rb,
lib/playwright/cli/commands/generate.rb,
lib/playwright/cli/utils/file_manager.rb,
lib/playwright/cli/commands/edit/command.rb,
lib/playwright/cli/commands/list/command.rb,
lib/playwright/cli/commands/destroy/command.rb,
lib/playwright/cli/commands/generate/command.rb
Defined Under Namespace
Modules: Commands, Registry, Utils
Classes: Command, Configuration, Template
Constant Summary
collapse
- ROOT_PATH =
Pathname.new(File.expand_path('../..', File.dirname(__FILE__)))
- PLAYS_PATH =
ROOT_PATH.join 'plays'
- PLAYS_BIN_PATH =
PLAYS_PATH.join 'bin'
- TEMPLATES_PATH =
ROOT_PATH.join 'lib', 'assets', 'templates'
- VERSION =
"0.1.19"
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.call(*args) ⇒ Object
39
40
41
|
# File 'lib/playwright/cli.rb', line 39
def self.call(*args)
new(Commands).call(*args)
end
|
.configuration ⇒ Object
31
32
33
|
# File 'lib/playwright/cli.rb', line 31
def self.configuration
@configuration ||= Configuration.new
end
|
35
36
37
|
# File 'lib/playwright/cli.rb', line 35
def self.configure
yield(configuration)
end
|
Instance Method Details
#call(arguments: ARGV, out: $stdout) ⇒ Object
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/playwright/cli.rb', line 43
def call(arguments: ARGV, out: $stdout)
result = commands.get(arguments)
if !result.found? && commands.has_root?
result = commands.get_root(arguments)
command, args = parse(result, out)
command.call(args)
else
super(*args)
end
end
|