class GitSpelunk::UI::RepoWindow
Attributes
command_buffer[RW]
command_mode[RW]
content[RW]
Public Class Methods
new(height)
click to toggle source
# File lib/git_spelunk/ui/repo.rb, line 6 def initialize(height) @height = height self.content = "" end
Public Instance Methods
draw()
click to toggle source
# File lib/git_spelunk/ui/repo.rb, line 11 def draw styles = Dispel::StyleMap.new(@height) styles.add(:reverse, 0, 0..999) view = [status_line] + content.split("\n") view = Array.new(@height).each_with_index.map {|_,i| view[i] } [view, styles] end
Private Instance Methods
status_line()
click to toggle source
with_highlighting do
# File lib/git_spelunk/ui/repo.rb, line 22 def status_line [ "navigation: j k CTRL-D CTRL-U", "history: [ ]", "search: / ? n N", "git-show: s", "quit: q" ].join(" ") end