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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b454199c694e89f9e385eaace86cf94d23e9e09d
4
- data.tar.gz: 576bb1e8edfd67fcee2ad2bfcd1688fc305804d1
3
+ metadata.gz: 1222f5998f72b095f970173d96a1c822e68cc657
4
+ data.tar.gz: be5bda4bc71dc2e4799446091870824e1ab2089f
5
5
  SHA512:
6
- metadata.gz: 3aa59d458012202f40505f89a12526f85c297382b70b44237343ba581f6cb4f6db68e477614eb924d421d4906f6e8fbf679fbd3a744c748d8a814672c7689157
7
- data.tar.gz: 5e4b5f065d74b6f27af526576d3c2860a83e03035072638a7093f657f032a63a5337a7a214100588ec4d74f32356dd7632313cdcd8626c172883dc61353c78f4
6
+ metadata.gz: fdd9421d90f22604664a0d413cb3b8b5103eee54c8e6e2f3d274630144eb1c91de8dccd1f4d506b086b869ee04c83a913e194fad99fdf08cfae73b7885c5c7b6
7
+ data.tar.gz: a61111e7027b343c0a6aa4acef949d9329b8f9fd657e85b397a92f9020527926ca5737a7f78b4135643de9d893eda7bd303214cf7703a92234805cf2ca3d836e
@@ -5,8 +5,21 @@ module Modulla
5
5
  Module.new.extend(self).class_eval(&block)
6
6
  end
7
7
 
8
- def included(klass)
9
- reproduce(klass)
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
- record_keeper << [method, args, block]
36
+ record(method, *args, &block)
24
37
  end
25
38
  end
@@ -1,3 +1,3 @@
1
1
  module Modulla
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-07 00:00:00.000000000 Z
11
+ date: 2016-11-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Enables DSL on your module
14
14
  email: