Sha256: cfa386d2136c93448742786f299629ba63eef0c5bd9b3cadadf2d03bc76d7f13
Contents?: true
Size: 773 Bytes
Versions: 1
Compression:
Stored size: 773 Bytes
Contents
module RubySpeech module SSML class Element < Niceogiri::XML::Node def self.new(element_name, atts = {}, &block) super element_name do |new_node| atts.each_pair { |k, v| new_node.send :"#{k}=", v } block_return = new_node.instance_eval &block if block_given? new_node << block_return if block_return.is_a?(String) end end def method_missing(method_name, *args, &block) const = SSML.const_get(method_name.to_s.titleize.gsub(' ', '')) if const && self.valid_child_type?(const) self << const.new(*args, &block) else super end end def eql?(o, *args) super o, :content, *args end end # Element end # SSML end # RubySpeech
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby_speech-0.1.0 | lib/ruby_speech/ssml/element.rb |