modulla 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/modulla.rb +16 -3
- data/lib/modulla/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1222f5998f72b095f970173d96a1c822e68cc657
|
4
|
+
data.tar.gz: be5bda4bc71dc2e4799446091870824e1ab2089f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdd9421d90f22604664a0d413cb3b8b5103eee54c8e6e2f3d274630144eb1c91de8dccd1f4d506b086b869ee04c83a913e194fad99fdf08cfae73b7885c5c7b6
|
7
|
+
data.tar.gz: a61111e7027b343c0a6aa4acef949d9329b8f9fd657e85b397a92f9020527926ca5737a7f78b4135643de9d893eda7bd303214cf7703a92234805cf2ca3d836e
|
data/lib/modulla.rb
CHANGED
@@ -5,8 +5,21 @@ module Modulla
|
|
5
5
|
Module.new.extend(self).class_eval(&block)
|
6
6
|
end
|
7
7
|
|
8
|
-
def
|
9
|
-
|
8
|
+
def self.extended(klass)
|
9
|
+
klass.extend ClassMethods
|
10
|
+
end
|
11
|
+
|
12
|
+
module ClassMethods
|
13
|
+
def included(klass)
|
14
|
+
klass.extend const_get(:ClassMethods) if const_defined?(:ClassMethods)
|
15
|
+
klass ? reproduce(klass) : record(:class_eval, &block)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def record(method, *args, &block)
|
22
|
+
record_keeper << [method, args, block]
|
10
23
|
end
|
11
24
|
|
12
25
|
def reproduce(klass)
|
@@ -20,6 +33,6 @@ module Modulla
|
|
20
33
|
end
|
21
34
|
|
22
35
|
def method_missing(method, *args, &block)
|
23
|
-
|
36
|
+
record(method, *args, &block)
|
24
37
|
end
|
25
38
|
end
|
data/lib/modulla/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modulla
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- namusyaka
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Enables DSL on your module
|
14
14
|
email:
|