Class: Basher::UI::ProgressView

Inherits:
BaseView
  • Object
show all
Defined in:
lib/basher/ui/progress_view.rb

Instance Attribute Summary collapse

Attributes inherited from BaseView

#should_redraw

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseView

#clear, #initialize, #resize_and_reposition, #will_resize!

Constructor Details

This class inherits a constructor from Basher::UI::BaseView

Instance Attribute Details

#gameObject

Returns the value of attribute game.



4
5
6
# File 'lib/basher/ui/progress_view.rb', line 4

def game
  @game
end

Class Method Details

.linesObject



6
7
8
# File 'lib/basher/ui/progress_view.rb', line 6

def self.lines
  1
end

Instance Method Details

#setupObject



10
11
12
13
14
15
16
17
18
# File 'lib/basher/ui/progress_view.rb', line 10

def setup
  clear
  render every: 0.1 do
    clear(false)
    window.attron(Ncurses::A_BOLD)
    puts '=' * remaining, h: :left
    window.attroff(Ncurses::A_BOLD)
  end
end