Sha256: 7c4dceb367dcd24e8a5220999292bd8b7290d1440e73348bea11a5a81aa4a524

Contents?: true

Size: 610 Bytes

Versions: 3

Compression:

Stored size: 610 Bytes

Contents

module RubySpeech
  module GRXML
    extend ActiveSupport::Autoload

    autoload :Element
    autoload :Grammar
    autoload :Rule
    autoload :Item
    autoload :OneOf
    autoload :Ruleref
    autoload :Tag
    autoload :Token

    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.instance_eval(&block) if block_given?
        grammar << block_return if block_return.is_a?(String)
      end
    end
  end # GRXML
end # RubySpeech

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_speech-0.3.2 lib/ruby_speech/grxml.rb
ruby_speech-0.3.1 lib/ruby_speech/grxml.rb
ruby_speech-0.3.0 lib/ruby_speech/grxml.rb