class Sheng::WMLFile

Attributes

errors[R]
filename[R]
xml[R]

Public Class Methods

new(filename, xml) click to toggle source
# File lib/sheng/wml_file.rb, line 7
def initialize(filename, xml)
  @filename = filename
  @xml = Nokogiri::XML(xml)
  @errors = {}
end

Public Instance Methods

interpolate(data_set) click to toggle source
# File lib/sheng/wml_file.rb, line 13
def interpolate(data_set)
  parent_set.interpolate(data_set)
  errors.merge!(parent_set.errors)
  parent_set.xml_fragment.to_s
end
parent_set() click to toggle source
# File lib/sheng/wml_file.rb, line 19
def parent_set
  @parent_set ||= MergeFieldSet.new('main', xml)
end
required_hash() click to toggle source
# File lib/sheng/wml_file.rb, line 23
def required_hash
  parent_set.required_hash
end
to_tree() click to toggle source
# File lib/sheng/wml_file.rb, line 27
def to_tree
  parent_set.to_tree
end