Sha256: ce9f5ef32117424c0b1b712ed6a29258094eee582f3e78af43d4cdf24c748515
Contents?: true
Size: 550 Bytes
Versions: 51
Compression:
Stored size: 550 Bytes
Contents
module Ruco class StatusBar def initialize(editor, options) @editor = editor @options = options end def view "Ruco #{Ruco::VERSION} -- #{@editor.file}#{change_indicator}#{writable_indicator}" end def format Curses::A_REVERSE end def change_indicator @editor.modified? ? '*' : ' ' end def writable_indicator @writeable ||= begin writable = (not File.exist?(@editor.file) or system("test -w #{@editor.file}")) writable ? ' ' : '!' end end end end
Version data entries
51 entries across 51 versions & 1 rubygems