lib/antelope/generator/error.rb in antelope-0.3.2 vs lib/antelope/generator/error.rb in antelope-0.4.0

- old
+ new

@@ -1,34 +1,34 @@ -# encoding: utf-8 - -module Antelope - module Generator - - # Generates an output file, mainly for debugging. Included always - # as a generator for a grammar. - class Error < Base - - register_as "error" - - has_directive "output.verbose", Boolean - - # Defines singleton method for every mod that the grammar passed - # to the generator. - # - # @see Generator#initialize - def initialize(*) - super - mods.each do |k, v| - define_singleton_method (k) { v } - end - end - - # Actually performs the generation. Uses the template in - # output.erb, and generates the file `<file>.output`. - # - # @return [void] - def generate - template "error", "#{file}.err" - end - end - end -end +# encoding: utf-8 + +module Antelope + module Generator + + # Generates an output file, mainly for debugging. Included always + # as a generator for a grammar. + class Error < Base + + register_as "error" + + has_directive "output.verbose", Boolean + + # Defines singleton method for every mod that the grammar passed + # to the generator. + # + # @see Generator#initialize + def initialize(*) + super + mods.each do |k, v| + define_singleton_method (k) { v } + end + end + + # Actually performs the generation. Uses the template in + # output.erb, and generates the file `<file>.output`. + # + # @return [void] + def generate + template "error", "#{file}.err" + end + end + end +end