glue 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +19 -0
- data/README +1 -1
- data/Rakefile +1 -1
- data/doc/RELEASES +4 -0
- data/lib/glue.rb +6 -2
- data/lib/glue/attribute.rb +3 -0
- data/lib/glue/inflector.rb +1 -1
- data/lib/glue/logger.rb +29 -4
- data/lib/glue/property.rb +50 -46
- data/test/glue/tc_property.rb +8 -1
- data/vendor/README +11 -0
- data/vendor/binding_of_caller.rb +81 -0
- data/vendor/blankslate.rb +53 -0
- data/vendor/breakpoint.rb +523 -0
- data/vendor/breakpoint_client.rb +196 -0
- data/vendor/extensions/_base.rb +153 -0
- data/vendor/extensions/_template.rb +36 -0
- data/vendor/extensions/all.rb +21 -0
- data/vendor/extensions/array.rb +68 -0
- data/vendor/extensions/binding.rb +224 -0
- data/vendor/extensions/class.rb +50 -0
- data/vendor/extensions/continuation.rb +71 -0
- data/vendor/extensions/enumerable.rb +250 -0
- data/vendor/extensions/hash.rb +23 -0
- data/vendor/extensions/io.rb +58 -0
- data/vendor/extensions/kernel.rb +42 -0
- data/vendor/extensions/module.rb +114 -0
- data/vendor/extensions/numeric.rb +230 -0
- data/vendor/extensions/object.rb +164 -0
- data/vendor/extensions/ostruct.rb +41 -0
- data/vendor/extensions/string.rb +316 -0
- data/vendor/extensions/symbol.rb +28 -0
- metadata +26 -3
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/local/bin/ruby -w
|
2
|
+
#
|
3
|
+
# == extensions/symbol.rb
|
4
|
+
#
|
5
|
+
# Adds methods to the builtin Symbol class.
|
6
|
+
#
|
7
|
+
|
8
|
+
require "extensions/_base"
|
9
|
+
|
10
|
+
|
11
|
+
#
|
12
|
+
# * Symbol#to_proc
|
13
|
+
#
|
14
|
+
ExtensionsProject.implement(Symbol, :to_proc) do
|
15
|
+
class Symbol
|
16
|
+
#
|
17
|
+
# Allows a Symbol to be implicitly converted to a Proc.
|
18
|
+
#
|
19
|
+
# This allows such conveniences as:
|
20
|
+
# %{john terry fiona}.map(&:capitalize) # -> %{John Terry Fiona}
|
21
|
+
# sum = numbers.inject(&:+)
|
22
|
+
#
|
23
|
+
def to_proc
|
24
|
+
proc { |obj, *args| obj.send(self, *args) }
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.10
|
3
3
|
specification_version: 1
|
4
4
|
name: glue
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2005-03-
|
6
|
+
version: 0.14.0
|
7
|
+
date: 2005-03-28
|
8
8
|
summary: Glue utilities
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -64,6 +64,29 @@ files:
|
|
64
64
|
- test/glue/tc_property_mixins.rb
|
65
65
|
- test/glue/tc_cache.rb
|
66
66
|
- test/glue/tc_numbers.rb
|
67
|
+
- vendor/breakpoint_client.rb
|
68
|
+
- vendor/extensions
|
69
|
+
- vendor/binding_of_caller.rb
|
70
|
+
- vendor/blankslate.rb
|
71
|
+
- vendor/breakpoint.rb
|
72
|
+
- vendor/README
|
73
|
+
- vendor/extensions/enumerable.rb
|
74
|
+
- vendor/extensions/all.rb
|
75
|
+
- vendor/extensions/hash.rb
|
76
|
+
- vendor/extensions/continuation.rb
|
77
|
+
- vendor/extensions/module.rb
|
78
|
+
- vendor/extensions/binding.rb
|
79
|
+
- vendor/extensions/ostruct.rb
|
80
|
+
- vendor/extensions/kernel.rb
|
81
|
+
- vendor/extensions/class.rb
|
82
|
+
- vendor/extensions/numeric.rb
|
83
|
+
- vendor/extensions/_base.rb
|
84
|
+
- vendor/extensions/io.rb
|
85
|
+
- vendor/extensions/string.rb
|
86
|
+
- vendor/extensions/object.rb
|
87
|
+
- vendor/extensions/array.rb
|
88
|
+
- vendor/extensions/symbol.rb
|
89
|
+
- vendor/extensions/_template.rb
|
67
90
|
test_files: []
|
68
91
|
rdoc_options:
|
69
92
|
- "--main"
|