Class: HeartTop::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/heart_top/cli.rb

Defined Under Namespace

Classes: UnsupportedCommand

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#intervalObject

Returns the value of attribute interval.



11
12
13
# File 'lib/heart_top/cli.rb', line 11

def interval
  @interval
end

#verboseObject

Returns the value of attribute verbose.



11
12
13
# File 'lib/heart_top/cli.rb', line 11

def verbose
  @verbose
end

Class Method Details

.runObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/heart_top/cli.rb', line 16

def run
  begin
    parse_args!
  rescue UnsupportedCommand => e
    print_error(e.message)
    exit
  end
  set_defaults
  print_details
  execute
end