class Antelope::Generator::Error

Generates an output file, mainly for debugging. Included always as a generator for a grammar.

Public Class Methods

new(*) click to toggle source

Defines singleton method for every mod that the grammar passed to the generator.

@see Generator#initialize

Calls superclass method Antelope::Generator::Base::new
# File lib/antelope/generator/error.rb, line 18
def initialize(*)
  super
  mods.each do |k, v|
    define_singleton_method (k) { v }
  end
end

Public Instance Methods

generate() click to toggle source

Actually performs the generation. Uses the template in output.erb, and generates the file ‘<file>.output`.

@return [void]

# File lib/antelope/generator/error.rb, line 29
def generate
  template "error", "#{file}.err"
end