Class: DevSystem::Command
- Inherits:
-
Liza::Controller
- Object
- Liza::Unit
- Liza::Controller
- DevSystem::Command
- Defined in:
- lib/dev_system/sub/command/command.rb
Direct Known Subclasses
BaseCommand, BenchCommand, InputCommand, IrbCommand, LogCommand, PryCommand, ShellCommand, TestCommand, LabSystem::DockerCommand, NetSystem::DatabaseCommand, WebSystem::RackCommand, WebSystem::RequestCommand
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Liza::Controller
color, inherited, on_connected
Methods inherited from Liza::Unit
const_missing, division, part, system, #system, test_class
Class Method Details
.call(args) ⇒ Object
3 4 5 6 |
# File 'lib/dev_system/sub/command/command.rb', line 3 def self.call args log "args = #{args}" new.call args end |
.get_command_signatures ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/dev_system/sub/command/command.rb', line 13 def self.get_command_signatures signatures = [] ancestors_until(Command).each do |c| signatures += c.methods_defined.select do |name| c.method(name).parameters == [[:req, :args]] end.map do |name| OpenStruct.new({ name: ( name == :call ? "" : name.to_s ), description: "# no description", }) end end signatures end |
Instance Method Details
#call(args) ⇒ Object
8 9 10 11 |
# File 'lib/dev_system/sub/command/command.rb', line 8 def call args log "args = #{args}" raise NotImplementedError end |