Class: Epuber::Command

Inherits:
CLAide::Command
  • Object
show all
Defined in:
lib/epuber/command.rb,
lib/epuber/command/init.rb,
lib/epuber/command/server.rb,
lib/epuber/command/compile.rb

Direct Known Subclasses

Compile, Init, Server

Defined Under Namespace

Classes: Compile, Init, Server

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.run(argv = []) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/epuber/command.rb', line 25

def self.run(argv = [])
  begin
    UI.current_command = self
    super
    UI.current_command = nil

  rescue => e
    UI.error!(e)

    UI.current_command = nil
  end
end

Instance Method Details

#runObject



43
44
45
# File 'lib/epuber/command.rb', line 43

def run
  UI.current_command = self
end

#validate!Object



38
39
40
41
# File 'lib/epuber/command.rb', line 38

def validate!
  super
  UI.current_command = self
end