lib/fathom/node.rb in fathom-0.3.6 vs lib/fathom/node.rb in fathom-0.3.7
- old
+ new
@@ -89,10 +89,10 @@
end
h
end
def add_accessor_for_node(node)
- return false unless node.is_a?(Node) and node.name_sym
+ return false unless node.respond_to?(:name_sym) and node.name_sym
return false if self.respond_to?(node.name_sym)
(class << self; self; end).module_eval do
define_method node.name_sym do
node
end