roxo 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/roxo.rb +4 -5
  2. data/roxo.gemspec +1 -1
  3. metadata +2 -2
@@ -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
- return z unless (z = self.class <=> other.class ).zero?
37
- return z unless (z = self.__attributes <=> other.__attributes).zero?
38
- return z unless (z = self.value <=> other.value ).zero?
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'roxo'
3
- gem.version = "0.1.2"
3
+ gem.version = "0.1.3"
4
4
 
5
5
  gem.author, gem.email = 'Burke Libbey', "burke@burkelibbey.org"
6
6
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Burke Libbey