Class: Epuber::Command

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

Direct Known Subclasses

Build, Init, Server

Defined Under Namespace

Classes: Build, Compile, Init, Server

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#debug_steps_timesObject

Returns the value of attribute debug_steps_times.



50
51
52
# File 'lib/epuber/command.rb', line 50

def debug_steps_times
  @debug_steps_times
end

Class Method Details

.run(argv = []) ⇒ Object



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

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

  rescue Interrupt
    UI.error('[!] Cancelled')
  rescue => e
    UI.error!(e)

    UI.current_command = nil
  end
end

Instance Method Details

#runObject



46
47
48
# File 'lib/epuber/command.rb', line 46

def run
  UI.current_command = self
end

#validate!Object



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

def validate!
  super
  UI.current_command = self
end