methods 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/methods.rb +1 -0
- data/lib/methods/instance_methods_wrapper.rb +15 -0
- data/lib/methods/method_without_args.rb +14 -0
- data/lib/methods/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 116a11c112805575fb7ee666e893977ca3aad47e
|
4
|
+
data.tar.gz: 8a5426be6438a7229f4c2910280729df19047920
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64bf970a298760113d33f396b0ca4508e159e1bc8b06530e3c4a36cf1b37af35aed9dab9c6012962a3e91488c885284616d3639b26c746c7d799f507c2cabdf5
|
7
|
+
data.tar.gz: a95f776467744c25ef019891f97b7b1191d9dbbe2ff281e30170268bffe385ef0e7c8611d553fde53f70f1106e682de24595dcbd3aa6b63a3526fb2ee5529248
|
data/lib/methods.rb
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
module Methods
|
2
2
|
module MethodWithoutArgs
|
3
|
+
module ClassMethods
|
4
|
+
def instance_method(*args)
|
5
|
+
if args.empty?
|
6
|
+
Methods::InstanceMethodsWrapper.new(self)
|
7
|
+
else
|
8
|
+
super
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.included(base)
|
14
|
+
base.extend(ClassMethods)
|
15
|
+
end
|
16
|
+
|
3
17
|
def method(*args)
|
4
18
|
if args.empty?
|
5
19
|
Methods::MethodsWrapper.new(self)
|
data/lib/methods/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: methods
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artur Roszczyk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: binding_of_caller
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- bin/console
|
85
85
|
- bin/setup
|
86
86
|
- lib/methods.rb
|
87
|
+
- lib/methods/instance_methods_wrapper.rb
|
87
88
|
- lib/methods/method_without_args.rb
|
88
89
|
- lib/methods/methods_wrapper.rb
|
89
90
|
- lib/methods/version.rb
|