lib/om/xml/dynamic_node.rb in om-1.5.3 vs lib/om/xml/dynamic_node.rb in om-1.6.0.rc1
- old
+ new
@@ -25,9 +25,11 @@
# # Other ways to perform this query:
# @article.find_by_terms(:journal, :title)[1]
# @article.ng_xml.xpath("//oxns:relatedItem[@type=\"host\"]/oxns:titleInfo/oxns:title", {"oxns"=>"http://www.loc.gov/mods/v3"})[1]
#
class DynamicNode
+ instance_methods.each { |m| undef_method m unless m.to_s =~ /^(?:nil\?|send|object_id|to_a)$|^__|^respond_to|proxy_/ }
+
attr_accessor :key, :index, :parent, :addressed_node, :term
def initialize(key, index, document, term, parent=nil) ##TODO a real term object in here would make it easier to lookup
self.key = key
self.index = index
@document = document