class TaskJuggler::KateSyntax
This class is a generator for Kate (kate-editor.org/) TaskJuggler
syntax highlighting files.
Public Class Methods
new()
click to toggle source
Create a generator object.
# File lib/taskjuggler/KateSyntax.rb, line 23 def initialize # Create a syntax reference for all current keywords. @reference = SyntaxReference.new(nil, true) @properties = [] @attributes = [] @reference.keywords.each_value do |kw| if kw.isProperty? @properties << kw else @attributes << kw end end @file = nil end
Public Instance Methods
generate(file)
click to toggle source
Generate the Kate syntax file into file.
# File lib/taskjuggler/KateSyntax.rb, line 42 def generate(file) @file = File.open(file, 'w') header keywords contexts highlights footer @file.close end