cig 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/cig.rb +17 -0
- metadata +45 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: a42e028ccfa15db60c1bff3701f1e3b9480b9dd0
|
|
4
|
+
data.tar.gz: d690303092a4ee350ab76f5dc88e90488c041f89
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 6e1ce4016f8ba6e00bbcccc55ce68a3d59ac08cab5b2b3608fcba9cf7c2cf3040f9e7ecf6157f29e961572f49038b78f91e6388aad57fffc13d3d4115c64c84c
|
|
7
|
+
data.tar.gz: 31ff387af1be6fee2fd2e724c553706b41d0a856a9e5df826abb0e4b95743840b65a10a2908822aac4ab42238d6856e27ef8f60061f2c8b9598d78ac3236c2bf
|
data/lib/cig.rb
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class Object
|
|
2
|
+
def cig(*args)
|
|
3
|
+
args = args.dup
|
|
4
|
+
|
|
5
|
+
if block_given?
|
|
6
|
+
raise ArgumentError, 'Do not pass this method both a block and other arguments.' if args.any?
|
|
7
|
+
return yield self
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
obj, meth = args.first.is_a?(Symbol) ? [self, args.shift] : [args.shift, args.shift]
|
|
11
|
+
|
|
12
|
+
send_meth = obj == self ? :send : :public_send
|
|
13
|
+
obj.send send_meth, meth, self, *args
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
alias_method :_?, :cig
|
|
17
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: cig
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Julien Negrotto
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2016-09-29 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description:
|
|
14
|
+
email: jtnegrotto@gmail.com
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- lib/cig.rb
|
|
20
|
+
homepage: https://www.github.com/jtnegrotto/cig
|
|
21
|
+
licenses:
|
|
22
|
+
- MIT
|
|
23
|
+
metadata: {}
|
|
24
|
+
post_install_message:
|
|
25
|
+
rdoc_options: []
|
|
26
|
+
require_paths:
|
|
27
|
+
- lib
|
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
34
|
+
requirements:
|
|
35
|
+
- - ">="
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
requirements: []
|
|
39
|
+
rubyforge_project:
|
|
40
|
+
rubygems_version: 2.6.6
|
|
41
|
+
signing_key:
|
|
42
|
+
specification_version: 4
|
|
43
|
+
summary: Tiny implementation of piping for Ruby
|
|
44
|
+
test_files: []
|
|
45
|
+
has_rdoc:
|