roxo 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/roxo.rb +2 -2
- data/roxo.gemspec +1 -1
- metadata +3 -3
data/lib/roxo.rb
CHANGED
@@ -30,7 +30,7 @@ class ROXO
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def terminal?
|
33
|
-
@children.
|
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
|
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]
|
data/roxo.gemspec
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
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-
|
17
|
+
date: 2010-05-11 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|