Sha256: e0b7087e2715fffe70a4930985ca24d2bdb30d697b4238757fe4ffcf5a4be97e
Contents?: true
Size: 774 Bytes
Versions: 2
Compression:
Stored size: 774 Bytes
Contents
# 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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
antelope-0.4.1 | lib/antelope/generator/error.rb |
antelope-0.4.0 | lib/antelope/generator/error.rb |