Class: DevSystem::Command

Inherits:
Liza::Controller show all
Defined in:
lib/dev_system/sub/command/command.rb

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_signaturesObject



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

Raises:

  • (NotImplementedError)


8
9
10
11
# File 'lib/dev_system/sub/command/command.rb', line 8

def call args
  log "args = #{args}"
  raise NotImplementedError
end