Sha256: 8292c395ab7609836dc2a3b92fc5fa2835bdfebb93d1c64741d30ca24ae5b59a
Contents?: true
Size: 888 Bytes
Versions: 2
Compression:
Stored size: 888 Bytes
Contents
# frozen_string_literal: true require "sod" module Tocer module CLI # The main Command Line Interface (CLI) object. class Shell include Dependencies[: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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tocer-19.1.0 | lib/tocer/cli/shell.rb |
tocer-19.0.0 | lib/tocer/cli/shell.rb |