Method: HMachine.map

Defined in:
lib/hmachine.rb

.map(key) ⇒ Object

Map a key to an element or design pattern



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/hmachine.rb', line 45

def self.map(key)
  case normalize(key)
    when :value_class, :valueclass, :abbr, :uri, :url, :typevalue
      HMachine::Pattern.map(key)
    when :hcard, :geo, :rellicense, :reltag, :votelinks, :xfn, :xmdp, :xoxo, :adr
      HMachine::Microformat.map(key)
    when :base
      HMachine::POSH::Base
    else
      raise "#{key} is not a recognized parser."
  end
end