Sha256: f8466f1dbb03add167b8f5676e449eb2a17395063b3ca25f4015ae1bf1c893f4
Contents?: true
Size: 953 Bytes
Versions: 20
Compression:
Stored size: 953 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 <%= configuration.project_levels.positive? ? configuration.project_name.inspect : configuration.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
20 entries across 20 versions & 1 rubygems