Sha256: 686c3e873d42f1d7807ec34dd6f2ed45716af76e5add249ecd153eb0f83f1bdd
Contents?: true
Size: 525 Bytes
Versions: 55
Compression:
Stored size: 525 Bytes
Contents
# frozen_string_literal: true require "dry/monads" module Gemsmith module Tools # Edits a gem within default editor. class Editor include Import[:executor, :environment] include Dry::Monads[:result] def call specification executor.capture3(client, specification.source_path.to_s).then do |_stdout, stderr, status| status.success? ? Success(specification) : Failure(stderr) end end private def client = environment.fetch("EDITOR") end end end
Version data entries
55 entries across 55 versions & 1 rubygems