Sha256: e6ee9f1e240efd9c49091dfd346f2ab9d2cd6048cc30d1b61dc6c5f1625bb85b
Contents?: true
Size: 882 Bytes
Versions: 20
Compression:
Stored size: 882 Bytes
Contents
# frozen_string_literal: true require "sod" module Tocer 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 :tocer, banner: specification.banner do on(Sod::Prefabs::Commands::Config, context:) on Commands::Upsert 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