Sha256: 0c643256f36077e95fafe2615a14e11dbe1cf418eb6924b55338c7ee418a4ff4

Contents?: true

Size: 667 Bytes

Versions: 9

Compression:

Stored size: 667 Bytes

Contents

module OM::XML::Generator
  
  attr_accessor :ng_xml
  
  # Class Methods -- These methods will be available on classes that include this Module 
  
  module ClassMethods
    
    def generate(property_ref, builder_new_value, opts={})
      template = builder_template(property_ref, opts)
      builder_call_body = eval('"' + template + '"')
      builder = Nokogiri::XML::Builder.new do |xml|
        eval( builder_call_body )
      end
      
      return builder.doc
    end
    
  end
  
  # Instance Methods -- These methods will be available on instances of classes that include this module
  
  def self.included(klass)
    klass.extend(ClassMethods)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
om-1.0.2 lib/om/xml/generator.rb
om-1.0.1 lib/om/xml/generator.rb
om-1.0.0 lib/om/xml/generator.rb
om-0.1.10 lib/om/xml/generator.rb
om-0.1.9 lib/om/xml/generator.rb
om-0.1.8 lib/om/xml/generator.rb
om-0.1.7 lib/om/xml/generator.rb
om-0.1.6 lib/om/xml/generator.rb
om-0.1.5 lib/om/xml/generator.rb