Class: Inch::CLI::Command::Output::Console
- Extended by:
- Forwardable
- Defined in:
- lib/inch/cli/command/output/console.rb
Constant Summary collapse
- COLOR =
magenta-ish
:color198
- BG_COLOR =
magenta-ish
:color207
Constants inherited from Base
Base::PRIORITY_ARROWS, Base::PRIORITY_MAP
Instance Attribute Summary collapse
-
#object ⇒ Object
(also: #o)
readonly
Returns the value of attribute object.
-
#objects ⇒ Object
readonly
Returns the value of attribute objects.
-
#source_parser ⇒ Object
readonly
Returns the value of attribute source_parser.
Instance Method Summary collapse
-
#initialize(options, object, objects, source_parser) ⇒ Console
constructor
A new instance of Console.
- #run ⇒ Object
- #run_pry ⇒ Object
Methods inherited from Base
Methods included from TraceHelper
Constructor Details
#initialize(options, object, objects, source_parser) ⇒ Console
Returns a new instance of Console.
23 24 25 26 27 28 29 30 |
# File 'lib/inch/cli/command/output/console.rb', line 23 def initialize(, object, objects, source_parser) @options = @object = object @objects = objects @source_parser = source_parser run end |
Instance Attribute Details
#object ⇒ Object (readonly) Also known as: o
Returns the value of attribute object.
8 9 10 |
# File 'lib/inch/cli/command/output/console.rb', line 8 def object @object end |
#objects ⇒ Object (readonly)
Returns the value of attribute objects.
8 9 10 |
# File 'lib/inch/cli/command/output/console.rb', line 8 def objects @objects end |
#source_parser ⇒ Object (readonly)
Returns the value of attribute source_parser.
8 9 10 |
# File 'lib/inch/cli/command/output/console.rb', line 8 def source_parser @source_parser end |
Instance Method Details
#run ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/inch/cli/command/output/console.rb', line 32 def run trace trace_header("Welcome to Inch's console", COLOR, BG_COLOR) trace edged(COLOR, @options.usage) @options.descriptions.each do |line| trace edged(COLOR, line) end run_pry end |
#run_pry ⇒ Object
42 43 44 |
# File 'lib/inch/cli/command/output/console.rb', line 42 def run_pry binding.pry end |