coderrr-mixico-inline 0.0.3 → 0.0.4
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.
- data/lib/mixico.rb +10 -4
- data/mixico-inline.gemspec +1 -1
- metadata +2 -2
data/lib/mixico.rb
CHANGED
|
@@ -4,7 +4,8 @@ require 'inline'
|
|
|
4
4
|
class Module
|
|
5
5
|
inline do |builder|
|
|
6
6
|
builder.c %q{
|
|
7
|
-
static VALUE
|
|
7
|
+
static VALUE
|
|
8
|
+
disable_mixin(VALUE super)
|
|
8
9
|
{
|
|
9
10
|
VALUE p, kid;
|
|
10
11
|
VALUE module = self;
|
|
@@ -25,7 +26,8 @@ class Module
|
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
builder.c %q{
|
|
28
|
-
static VALUE
|
|
29
|
+
static VALUE
|
|
30
|
+
enable_mixin(VALUE mixin)
|
|
29
31
|
{
|
|
30
32
|
VALUE p;
|
|
31
33
|
VALUE module = self;
|
|
@@ -47,11 +49,15 @@ end
|
|
|
47
49
|
|
|
48
50
|
class Proc
|
|
49
51
|
def mixin mod
|
|
50
|
-
|
|
52
|
+
context.extend mod
|
|
51
53
|
end
|
|
52
54
|
|
|
53
55
|
def mixout mod
|
|
54
|
-
(class <<
|
|
56
|
+
(class << context; self end).disable_mixin mod
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def context
|
|
60
|
+
eval('self', self)
|
|
55
61
|
end
|
|
56
62
|
end
|
|
57
63
|
|
data/mixico-inline.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: coderrr-mixico-inline
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- why
|
|
@@ -11,7 +11,7 @@ autorequire: mixico
|
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
13
|
|
|
14
|
-
date: 2008-10-
|
|
14
|
+
date: 2008-10-25 00:00:00 -07:00
|
|
15
15
|
default_executable:
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|