Class: DTK::Shell::HeaderShell

Inherits:
Object
  • Object
show all
Defined in:
lib/shell/header_shell.rb

Overview

We will use this class to generate header for console which would be always present, when activated. Hirb implementation will be used to display status information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHeaderShell

Returns a new instance of HeaderShell.



31
32
33
# File 'lib/shell/header_shell.rb', line 31

def initialize
  @active = true
end

Instance Attribute Details

#activeObject Also known as: is_active?

Returns the value of attribute active.



28
29
30
# File 'lib/shell/header_shell.rb', line 28

def active
  @active
end

Instance Method Details



35
36
37
38
39
# File 'lib/shell/header_shell.rb', line 35

def print_header
  puts "*********************"
  puts "********************* #{Time.now} "
  puts "*********************"
end