Sha256: 5874849f31b0f91ed9db0dce95257a67d64d06b9cf3c82f854270d7c5ccccefb

Contents?: true

Size: 744 Bytes

Versions: 2

Compression:

Stored size: 744 Bytes

Contents

module RubySpeech
  module GRXML
    extend ActiveSupport::Autoload

    eager_autoload do
      autoload :Element
      autoload :Grammar
      autoload :Rule
      autoload :Item
      autoload :OneOf
      autoload :Ruleref
      autoload :Tag
      autoload :Token
    end

    InvalidChildError = Class.new StandardError

    GRXML_NAMESPACE = 'http://www.w3.org/2001/06/grammar'

    def self.draw(attributes = {}, &block)
      Grammar.new(attributes).tap do |grammar|
        block_return = grammar.eval_dsl_block &block
        grammar << block_return if block_return.is_a?(String)
      end
    end

    def self.import(other)
      Element.import other
    end
  end # GRXML
end # RubySpeech

ActiveSupport::Autoload.eager_autoload!

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby_speech-0.4.0 lib/ruby_speech/grxml.rb
ruby_speech-0.3.4 lib/ruby_speech/grxml.rb