Class: Agentilda::CLI::Create
- Defined in:
- lib/agentilda/cli/create/create.rb
Overview
agentilda create <words…> — backs /spec-create.
Constant Summary
Constants included from UI
UI::MAX_WIDTH, UI::METER_WIDTH, UI::MIN_WIDTH, UI::NO_FAILURE, UI::NO_FIELDS, UI::NO_TIMEOUT, UI::PROGRESS_THRESHOLD, UI::TIMER_WARNING, UI::TIMER_WIDTH
Instance Method Summary collapse
Methods inherited from Base
Methods included from UI
abbreviate, activity_for, animate?, box, box_height, color?, concurrently, countdown, default_jobs, display_width, elapsed, #error, fit, #info, line, log, logging_activity, meter, monotonic, once, paint, #paint, pastel, popup, report_line, reset!, said, #say, solo_spinner, spinning, stepping, #success, threaded, tty?, #warn, width
Instance Method Details
#call(words:, **options) ⇒ void
This method returns an undefined value.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/agentilda/cli/create/create.rb', line 61 def call(words:, **) dir = .fetch(:dir, Agentilda::PLANS_DIR) FileUtils.mkdir_p(dir) words, seed = resolve_seed(words, ) prs = fetch_prs() result = Creator.new(dir:).create( words:, after: [:after], status: [:status], prs: ) result.either( ->(path) { created(path, prs, , seed:) }, ->() { refuse("Could not create the plan:\n#{}", 65) } ) end |