Sha256: 309b5c995e5841e5ab9a7055f1bbd09e75c40f81fcfea0a66781f47723b124b1
Contents?: true
Size: 518 Bytes
Versions: 8
Compression:
Stored size: 518 Bytes
Contents
require 'forwardable' require 'cl/config' require 'cl/ui' class Cl class Ctx extend Forwardable def_delegators :ui, :puts, :stdout, :announce, :info, :notice, :warn, :error, :success, :cmd attr_accessor :config, :name, :ui def initialize(name, opts = {}) @config = Config.new(name).to_h @ui = opts[:ui] || Ui.new(self, opts) @name = name end def abort(error, *strs) ui.abort(error, *strs) end def test? ENV['ENV'] == 'test' end end end
Version data entries
8 entries across 8 versions & 1 rubygems