Class: Amx::Document

Class Amx::Document |
In: | lib/amrita/amx.rb
Parent: | REXML::Document

Methods

template_href

Public Instance methods

template_href()

    # File lib/amrita/amx.rb, line 18
        def template_href
          ret = "default.amx"
          each do |n|
            next unless n.kind_of?(REXML::Instruction)
            next unless n.target.downcase == "amx"
            if n.content =~ /(\w+)="(.*)"/ and $1 == "href"
              ret = $2
              break
            else
              raise "unknown instruction #{n.content}"
            end
          end
          ret
        end