lib/ess/element.rb
##
# Objects of this class represent the various tags available in ESS
#
Objects of this class represent the various tags available in ESS
Objects of this class represent the various tags available in ESS
def extend_tag_list m, args, &block
        arg_hash = {}
        args.each { |arg| arg_hash = arg if arg.class == Hash }
        tag_name = m[4..-1].to_sym
        new_tag = Element.new(tag_name, @dtd[:tags][tag_name][:dtd])
        new_tag.text!(args[0]) if args.any? && args[0].class == String
        arg_hash.each_pair { |key, value| new_tag.send([key, "_attr"].join("").to_sym, value) }
        block.call new_tag if block
        (child_tags[tag_name] ||= []).push new_tag
        run_post_processing new_tag
        return new_tag
      end
def extend_tag_list m , args , & block arg_hash = { } args . each { | arg | arg_hash = arg if arg . class == Hash } tag_name = m [ 4 .. - 1 ] . to_sym new_tag = Element . new ( tag_name , @dtd [ :tags ] [ tag_name ] [ :dtd ] ) new_tag . text! ( args [ 0 ] ) if args . any? && args [ 0 ] . class == String arg_hash . each_pair { | key , value | new_tag . send ( [ key , "_attr" ] . join ( "" ) . to_sym , value ) } block . call new_tag if block ( child_tags [ tag_name ] ||= [ ] ) . push new_tag run_post_processing new_tag return new_tag end
Objects of this class represent the various tags available in ESS
Objects of this class represent the various tags available in ESS
m
<not_specific>
args
<not_specific>
block
<not_specific>