Sha256: f3764248727c4f5e9d0c8e81f619ed15cd4273653ae1ae31c73625d326c54985
Contents?: true
Size: 1.46 KB
Versions: 4
Compression:
Stored size: 1.46 KB
Contents
module Inch module CLI module Command module Output class Console < Base extend Forwardable attr_reader :object, :objects, :codebase COLOR = :color198 # magenta-ish BG_COLOR = :color207 # magenta-ish # @param options [Options::Console] # @param object [CodeObject::Proxy::Base] # @param objects [Array<CodeObject::Proxy::Base>] # @param codebase [Codebase::Proxy] def initialize(options, object, objects, codebase) @options = options @object = object @objects = objects @codebase = codebase run end def all_objects @codebase.objects.all end def find_objects(fullname) @codebase.objects.starting_with(fullname) end def find_object(fullname) @codebase.objects.find(fullname) end alias_method :all, :all_objects alias_method :ff, :find_objects alias_method :f, :find_object alias_method :o, :object def run ui.trace ui.header("Welcome to Inch's console", COLOR, BG_COLOR) ui.sub @options.usage @options.descriptions.each do |line| ui.sub line end run_pry end def run_pry binding.pry end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems