roxo 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/roxo.rb +2 -2
  2. data/roxo.gemspec +1 -1
  3. metadata +3 -3
@@ -30,7 +30,7 @@ class ROXO
30
30
  end
31
31
 
32
32
  def terminal?
33
- @children.blank? and @attributes.blank?
33
+ @children.size.zero? and @attributes.blank?
34
34
  end # A node is terminal if we can't descend any further
35
35
 
36
36
  def <=>(other)
@@ -50,7 +50,7 @@ class ROXO
50
50
  def method_missing(sym, *args)
51
51
  if terminal? # Proxy all method calls to the wrapped object.
52
52
  return @value.send(sym, *args)
53
- elsif sym.to_s[-1..-1]=="?" # re-dispatch without question mark, interpret result as a boolean.
53
+ elsif sym.to_s =~ /\?$/ # re-dispatch without question mark, interpret result as a boolean.
54
54
  node = send(sym.to_s[0..-2].to_sym, *args)
55
55
  return node ? %w{yes true t y}.include?(node.downcase) : nil
56
56
  elsif @children[sym]
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'roxo'
3
- gem.version = '0.1.11'
3
+ gem.version = '0.1.12'
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
- - 11
9
- version: 0.1.11
8
+ - 12
9
+ version: 0.1.12
10
10
  platform: ruby
11
11
  authors:
12
12
  - Burke Libbey
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-26 00:00:00 -05:00
17
+ date: 2010-05-11 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency