Class: DevSystem::CommandPanel

Inherits:
Liza::Panel show all
Defined in:
lib/dev_system/subsystems/command/command_panel.rb

Instance Attribute Summary

Attributes inherited from Liza::Panel

#key

Instance Method Summary collapse

Methods inherited from Liza::Panel

#box, box, color, controller, #controller, division, #division, #initialize, instance, #push, #started, subsystem, #subsystem, token

Methods inherited from Liza::Unit

_erbs_for, #add, add, cl, #cl, class_methods_defined, const_added, const_missing, constants_defined, define_error, descendants_select, division, erbs_available, erbs_defined, erbs_for, errors, #fetch, fetch, get, #get, instance_methods_defined, log, #log, log?, #log?, #log_array, log_array, log_hash, #log_hash, #log_level, log_level, #log_level?, log_level?, log_levels, #log_levels, #log_render_convert, #log_render_format, #log_render_in, #log_render_out, method_added, methods_defined, namespace, part, raise_error, #raise_error, reload!, #reload!, #render, #render!, #render_stack, renderable_formats_for, renderable_names, section, sections, #set, set, #settings, settings, singleton_method_added, sleep, #sleep, stick, #stick, sticks, #sticks, subclasses_select, subunits, system, #system, system?, test_class, time_diff, #time_diff

Constructor Details

This class inherits a constructor from Liza::Panel

Instance Method Details

#call(args) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/dev_system/subsystems/command/command_panel.rb', line 7

def call args
  log :higher, "args = #{args.inspect}"

  env = forge args
  forge_shortcut env
  find env
  find_shortcut env
  forward env
end

#forge(args) ⇒ Object



19
20
21
22
23
24
25
26
27
28
# File 'lib/dev_system/subsystems/command/command_panel.rb', line 19

def forge args
  args = [""] if args.empty?
  command_arg, *args = args
  command_name_original, command_action_original = command_arg.split(":")
  
  env = { controller: :command, command_arg:, args:, command_name_original:, command_action_original: }
  
  log :high, "command_name_original:command_action_original is     #{command_name_original}:#{command_action_original}"
  env
end