loquacious 1.6.1 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/loquacious/configuration.rb +2 -7
- data/lib/loquacious/undefined.rb +7 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/help_spec.rb +1 -1
- data/spec/iterator_spec.rb +1 -1
- data/spec/loquacious_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -2
- data/spec/string_spec.rb +1 -1
- data/version.txt +1 -1
- metadata +3 -3
data/History.txt
CHANGED
@@ -49,11 +49,7 @@ module Loquacious
|
|
49
49
|
alias :help :help_for
|
50
50
|
end
|
51
51
|
|
52
|
-
|
53
|
-
#
|
54
|
-
alias :__respond_to? :respond_to?
|
55
|
-
|
56
|
-
Keepers = %r/^__|^object_id$|^\w+\?$/
|
52
|
+
Keepers = %r/^__|^object_id$|^initialize$|^\w+\?$/
|
57
53
|
instance_methods(true).each do |m|
|
58
54
|
next if m[Keepers]
|
59
55
|
undef_method m
|
@@ -119,7 +115,7 @@ module Loquacious
|
|
119
115
|
# Only invoke public methods on the Configuration instances.
|
120
116
|
#
|
121
117
|
def __send( symbol, *args, &block )
|
122
|
-
if self.
|
118
|
+
if self.respond_to? symbol
|
123
119
|
self.__send__(symbol, *args, &block)
|
124
120
|
else
|
125
121
|
self.method_missing(symbol, *args, &block)
|
@@ -188,7 +184,6 @@ module Loquacious
|
|
188
184
|
# configuration object.
|
189
185
|
#
|
190
186
|
class DSL
|
191
|
-
Keepers = %r/^__|^object_id|^initialize$/
|
192
187
|
instance_methods(true).each do |m|
|
193
188
|
next if m[Keepers]
|
194
189
|
undef_method m
|
data/lib/loquacious/undefined.rb
CHANGED
@@ -12,7 +12,7 @@ module Loquacious
|
|
12
12
|
#
|
13
13
|
class Undefined
|
14
14
|
|
15
|
-
Keepers = %r/^__|^object_id$|^initialize$|^
|
15
|
+
Keepers = %r/^__|^object_id$|^initialize$|^call$|^\w+\?$/
|
16
16
|
instance_methods(true).each do |m|
|
17
17
|
next if m[Keepers]
|
18
18
|
undef_method m
|
@@ -69,6 +69,12 @@ information about the undefined properties.
|
|
69
69
|
#
|
70
70
|
def nil?() true; end
|
71
71
|
|
72
|
+
# We can respond to any method except :call. The call method is reserved
|
73
|
+
# for Procs and lambdas, and it is used internally by loquacious for lazy
|
74
|
+
# evaluation of configuration parameters.
|
75
|
+
#
|
76
|
+
def respond_to_missing?( id, priv = false ) id != :call; end
|
77
|
+
|
72
78
|
# For every method invoked on an undefined object, generate a warning
|
73
79
|
# message describing the undefined value and the method that was called.
|
74
80
|
#
|
data/spec/configuration_spec.rb
CHANGED
data/spec/help_spec.rb
CHANGED
data/spec/iterator_spec.rb
CHANGED
data/spec/loquacious_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/string_spec.rb
CHANGED
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.2
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 6
|
8
|
-
-
|
9
|
-
version: 1.6.
|
8
|
+
- 2
|
9
|
+
version: 1.6.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Tim Pease
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-06-01 00:00:00 -06:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|