Class: Ready::CLI::Compile
- Inherits:
-
CommandKit::Command
- Object
- CommandKit::Command
- Ready::CLI::Compile
- Includes:
- RakeCommand
- Defined in:
- lib/ready/cli/compile.rb
Overview
Compiles ready stubs and prints them to stdout, or compiles everything via rake:
ready compile/ready compile all: compile every stub (rake ready:compile) -- barecompiledefaults toall, likemakeready compile by: the persistentbyclient aliasready compile NAME ...: a zsh function stub per CLI name
The --rubygems/--yjit flags only apply to by; --environment only
applies to named CLIs.
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ Compile
constructor
Seeds the per-invocation environment accumulator that the
-eoption block writes into. -
#run(*names) ⇒ Object
Dispatches on the argument(s):
allcompiles everything via rake,byprints the persistent-client alias, and anything else is treated as one or more gem/CLI names.
Methods included from RakeCommand
Constructor Details
#initialize(**kwargs) ⇒ Compile
Seeds the per-invocation environment accumulator that the -e option
block writes into. The --rubygems/--yjit booleans are read straight
from #options, which command_kit populates for us.
61 62 63 64 65 |
# File 'lib/ready/cli/compile.rb', line 61 def initialize(**kwargs) super @environment = {} end |
Instance Method Details
#run(*names) ⇒ Object
Dispatches on the argument(s): all compiles everything via rake, by
prints the persistent-client alias, and anything else is treated as one
or more gem/CLI names.
74 75 76 77 78 79 80 81 82 |
# File 'lib/ready/cli/compile.rb', line 74 def run(*names) case names in [] | ["all"] then rake("ready:compile") in ["by"] then print by_alias else reject_reserved_names!(names) print gem_script(names) end end |