Class: Namelab::CLI::Commands::Say
- Defined in:
- lib/namelab/cli.rb
Constant Summary collapse
- DEFAULT_ARGS =
%w(-i -v Victoria).freeze
Instance Method Summary collapse
Methods inherited from Generate
Methods included from InheritanceHook
Instance Method Details
#call(sayopt:, **opts) ⇒ Object
66 67 68 69 70 |
# File 'lib/namelab/cli.rb', line 66 def call(sayopt:, **opts) @say_args = sayopt.shellsplit @say_args.unshift(*DEFAULT_ARGS) if @say_args != DEFAULT_ARGS super end |
#output(result) ⇒ Object
72 73 74 |
# File 'lib/namelab/cli.rb', line 72 def output(result) system("/usr/bin/say", *@say_args, result) end |