Sha256: 7396990fe550e2be507c4637b44a8901b840af31028e955011cbca72dd89fe02
Contents?: true
Size: 938 Bytes
Versions: 11
Compression:
Stored size: 938 Bytes
Contents
require "sod" <% namespace do %> module CLI # The main Command Line Interface (CLI) object. class Shell include Import[:defaults_path, :xdg_config, :specification] def initialize(context: Sod::Context, dsl: Sod, **) super(**) @context = context @dsl = dsl end def call(...) = cli.call(...) private attr_reader :context, :dsl def cli context = build_context dsl.new <%= settings.project_levels.positive? ? settings.project_name.inspect : settings.project_name.to_sym.inspect %>, banner: specification.banner do on(Sod::Prefabs::Commands::Config, context:) 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 end <% end %>
Version data entries
11 entries across 11 versions & 1 rubygems