Class: DTK::Shell::HeaderShell
- Inherits:
-
Object
- Object
- DTK::Shell::HeaderShell
- 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
-
#active ⇒ Object
(also: #is_active?)
Returns the value of attribute active.
Instance Method Summary collapse
-
#initialize ⇒ HeaderShell
constructor
A new instance of HeaderShell.
- #print_header ⇒ Object
Constructor Details
#initialize ⇒ HeaderShell
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
#active ⇒ Object 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
#print_header ⇒ Object
35 36 37 38 39 |
# File 'lib/shell/header_shell.rb', line 35 def print_header puts "*********************" puts "********************* #{Time.now} " puts "*********************" end |