roxo 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/roxo.rb +4 -5
- data/roxo.gemspec +1 -1
- metadata +2 -2
data/lib/roxo.rb
CHANGED
@@ -4,7 +4,7 @@ require 'libxml'
|
|
4
4
|
# Ruby Objects as XML Objects
|
5
5
|
class ROXO
|
6
6
|
instance_methods.each do |meth|
|
7
|
-
eval "undef #{meth}" unless [:__send__, :__id__, :object_id, :class].include?(meth.to_sym)
|
7
|
+
eval "undef #{meth}" unless [:__send__, :__id__, :object_id, :class, :send].include?(meth.to_sym)
|
8
8
|
end
|
9
9
|
|
10
10
|
include Comparable
|
@@ -33,10 +33,9 @@ class ROXO
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def <=>(other)
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
return z unless (z = self.name <=> other.name ).zero?
|
36
|
+
[:class, :__attributes, :value, :name].each do |key|
|
37
|
+
return z unless (z = self.send(key) <=> other.send(key)).zero?
|
38
|
+
end
|
40
39
|
nodes = lambda{|obj|obj.children.values.flatten.map{|n|self.class.new(n)}}
|
41
40
|
nodes[self] <=> nodes[other]
|
42
41
|
end
|
data/roxo.gemspec
CHANGED