Sha256: 741a43a66fb01b968e6f9dffdc2f879ae1c2617daa6a6abaa2c7095728aed024

Contents?: true

Size: 453 Bytes

Versions: 4

Compression:

Stored size: 453 Bytes

Contents

module Antelope
  module DSL
    module Contexts
      class Production < Base
        def production(name, &block)
          @productions[name].concat(context(Match, &block))
        end

        private

        attr_reader :productions
        alias_method :data, :productions

        def before_call
          @productions = Hash.new { |h, k| h[k] = [] }
        end

        def data
          @productions
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
antelope-0.4.1 lib/antelope/dsl/contexts/production.rb
antelope-0.4.0 lib/antelope/dsl/contexts/production.rb
antelope-0.3.2 lib/antelope/dsl/contexts/production.rb
antelope-0.3.0 lib/antelope/dsl/contexts/production.rb