mug 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/mug/self.rb +2 -1
- data/test/test-self.rb +5 -0
- metadata +31 -36
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ec16a0f2226eb6eafb7e8c6afaf981e0d3e32443
|
4
|
+
data.tar.gz: 8988d0ce42d14a76908d9e4fc105e4d3873fc246
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1c58dcb88c0119f5bb4afd1a01064698f6e732de96c974667d67f7d4048797d3e50b3f3fb3b669ccc46d05b6d917d30003b5300cfe1c7489a6e8cd2d630bdde4
|
7
|
+
data.tar.gz: 0c5275b171001c5471185873765cc2c2912631ec65f6a44fd60b06031b7f7509093905b11c93e9bf01c69dc4e2c743817b85dbb90fb63808594ad59e6f0ec5d5
|
data/lib/mug/self.rb
CHANGED
@@ -13,10 +13,11 @@ class Object
|
|
13
13
|
self
|
14
14
|
end
|
15
15
|
end
|
16
|
+
alias :yield :self
|
16
17
|
end
|
17
18
|
|
18
19
|
=begin
|
19
|
-
Copyright (c)
|
20
|
+
Copyright (c) 2014, Matthew Kerwin <matthew@kerwin.net.au>
|
20
21
|
|
21
22
|
Permission to use, copy, modify, and/or distribute this software for any
|
22
23
|
purpose with or without fee is hereby granted, provided that the above
|
data/test/test-self.rb
CHANGED
@@ -9,5 +9,10 @@ class Test_self < Test::Unit::TestCase
|
|
9
9
|
assert_equal( obj, obj.self )
|
10
10
|
assert_equal( 6, 2.self{|i| i*3 } )
|
11
11
|
assert_equal( {1=>[1,1], 2=>[2,2], 3=>[3]}, [1,1,2,2,3].group_by(&:self) )
|
12
|
+
|
13
|
+
assert_equal( 1, 1.yield )
|
14
|
+
assert_equal( obj, obj.yield )
|
15
|
+
assert_equal( 6, 2.yield{|i| i*3 } )
|
16
|
+
assert_equal( {1=>[1,1], 2=>[2,2], 3=>[3]}, [1,1,2,2,3].group_by(&:yield) )
|
12
17
|
end
|
13
18
|
end
|
metadata
CHANGED
@@ -1,25 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Matthew Kerwin
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-07-28 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
|
-
description:
|
15
|
-
|
13
|
+
description: |
|
14
|
+
== MUG: Matty's Ultimate Gem
|
16
15
|
|
17
16
|
A collection of wonders to astound the mind!!
|
18
17
|
|
19
|
-
|
20
18
|
See the documentation at [github](https://github.com/phluid61/mug).
|
21
|
-
|
22
|
-
'
|
23
19
|
email:
|
24
20
|
- matthew@kerwin.net.au
|
25
21
|
executables: []
|
@@ -27,63 +23,62 @@ extensions: []
|
|
27
23
|
extra_rdoc_files: []
|
28
24
|
files:
|
29
25
|
- lib/mug.rb
|
30
|
-
- lib/mug/
|
31
|
-
- lib/mug/
|
32
|
-
- lib/mug/
|
26
|
+
- lib/mug/and-or.rb
|
27
|
+
- lib/mug/apply.rb
|
28
|
+
- lib/mug/array.rb
|
29
|
+
- lib/mug/array/extend.rb
|
30
|
+
- lib/mug/bool.rb
|
33
31
|
- lib/mug/fragile-method-chain.rb
|
34
32
|
- lib/mug/hash.rb
|
35
|
-
- lib/mug/self.rb
|
36
|
-
- lib/mug/iterator.rb
|
37
|
-
- lib/mug/and-or.rb
|
38
|
-
- lib/mug/hash/operations.rb
|
39
33
|
- lib/mug/hash/map.rb
|
34
|
+
- lib/mug/hash/operations.rb
|
35
|
+
- lib/mug/hashmap.rb
|
40
36
|
- lib/mug/hashop.rb
|
41
|
-
- lib/mug/
|
42
|
-
- lib/mug/array.rb
|
37
|
+
- lib/mug/iterator.rb
|
43
38
|
- lib/mug/iterator/for.rb
|
44
39
|
- lib/mug/iterator/method.rb
|
45
|
-
- lib/mug/array/extend.rb
|
46
|
-
- lib/mug/maybe.rb
|
47
40
|
- lib/mug/iterator_c.rb
|
48
|
-
- lib/mug/
|
49
|
-
-
|
50
|
-
-
|
51
|
-
-
|
52
|
-
- test/
|
53
|
-
- test/test-to_h.rb
|
41
|
+
- lib/mug/maybe.rb
|
42
|
+
- lib/mug/self.rb
|
43
|
+
- lib/mug/tau.rb
|
44
|
+
- lib/mug/to_h.rb
|
45
|
+
- test/test-and-or.rb
|
54
46
|
- test/test-array-extend.rb
|
47
|
+
- test/test-bool.rb
|
55
48
|
- test/test-fragile-method-chain.rb
|
56
|
-
- test/test-and-or.rb
|
57
|
-
- test/test-iterator-method.rb
|
58
|
-
- test/test-iterator-for.rb
|
59
|
-
- test/test-maybe.rb
|
60
49
|
- test/test-hashmap.rb
|
61
50
|
- test/test-hashop.rb
|
51
|
+
- test/test-iterator-for.rb
|
52
|
+
- test/test-iterator-method.rb
|
53
|
+
- test/test-maybe.rb
|
54
|
+
- test/test-self.rb
|
55
|
+
- test/test-tau.rb
|
56
|
+
- test/test-to_h.rb
|
57
|
+
- test/test_apply.rb
|
62
58
|
homepage: http://phluid61.github.com/mug
|
63
59
|
licenses:
|
64
60
|
- ISC License
|
61
|
+
metadata: {}
|
65
62
|
post_install_message:
|
66
63
|
rdoc_options: []
|
67
64
|
require_paths:
|
68
65
|
- lib
|
69
66
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
-
none: false
|
71
67
|
requirements:
|
72
|
-
- -
|
68
|
+
- - ">="
|
73
69
|
- !ruby/object:Gem::Version
|
74
70
|
version: '0'
|
75
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
72
|
requirements:
|
78
|
-
- -
|
73
|
+
- - ">="
|
79
74
|
- !ruby/object:Gem::Version
|
80
75
|
version: '0'
|
81
76
|
requirements: []
|
82
77
|
rubyforge_project:
|
83
|
-
rubygems_version:
|
78
|
+
rubygems_version: 2.2.2
|
84
79
|
signing_key:
|
85
|
-
specification_version:
|
86
|
-
summary:
|
80
|
+
specification_version: 4
|
81
|
+
summary: 'MUG: Matty''s Ultimate Gem'
|
87
82
|
test_files:
|
88
83
|
- test/test-tau.rb
|
89
84
|
- test/test-self.rb
|