class Gemsmith::CLI::Shell
The main Command Line Interface (CLI
) object.
Public Class Methods
Source
# File lib/gemsmith/cli/shell.rb, line 11 def initialize(context: Sod::Context, dsl: Sod, **) super(**) @context = context @dsl = dsl end
Calls superclass method
Public Instance Methods
Source
# File lib/gemsmith/cli/shell.rb, line 38 def build_context context[defaults_path:, xdg_config:, version_label: specification.labeled_version] end
Source
# File lib/gemsmith/cli/shell.rb, line 17 def call(...) = cli.call(...) private attr_reader :context, :dsl def cli context = build_context dsl.new :gemsmith, banner: specification.banner do on(Sod::Prefabs::Commands::Config, context:) on Commands::Build on Actions::Install on Actions::Publish on Actions::Edit on Actions::View on(Sod::Prefabs::Actions::Version, context:) on Sod::Prefabs::Actions::Help, self end end def build_context context[defaults_path:, xdg_config:, version_label: specification.labeled_version] end end
Source
# File lib/gemsmith/cli/shell.rb, line 23 def cli context = build_context dsl.new :gemsmith, banner: specification.banner do on(Sod::Prefabs::Commands::Config, context:) on Commands::Build on Actions::Install on Actions::Publish on Actions::Edit on Actions::View on(Sod::Prefabs::Actions::Version, context:) on Sod::Prefabs::Actions::Help, self end end