# File lib/maruku/element.rb, line 51 def initialize(node_type = :unset, children = [], meta = {}, al = nil) self.children = children self.node_type = node_type self.attributes = {} # Define a new accessor on the singleton class for this instance # for each metadata key meta.each do |symbol, value| class << self self end.send(:attr_accessor, symbol) self.send("#{symbol}=", value) end self.al = al || AttributeList.new self.meta_priv = meta end