Sha256: c2bd93a55bf8698d49be05b1581d564d7d3d61ab63d1aa6c979eb0cdf34c2379
Contents?: true
Size: 675 Bytes
Versions: 12
Compression:
Stored size: 675 Bytes
Contents
# frozen_string_literal: true require "optparse" module RubyNext module Commands class Base class << self def run(args) new(args).run end end def initialize(args) parse! args end def parse!(*) raise NotImplementedError end def run raise NotImplementedError end def log(msg) return unless CLI.verbose $stdout.puts msg end def base_parser OptionParser.new do |opts| yield opts opts.on("-V", "Turn on verbose mode") do CLI.verbose = true end end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems