Sha256: 8f2893af1c348c5b544b91ea05175f4011ecc750d9021ff85f8a6fc482d17521
Contents?: true
Size: 893 Bytes
Versions: 40
Compression:
Stored size: 893 Bytes
Contents
# frozen_string_literal: true require "sod" module Hanamismith 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 :hanamismith, banner: specification.banner do on(Sod::Prefabs::Commands::Config, context:) on Commands::Build 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
40 entries across 40 versions & 1 rubygems