dominate 0.2.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dominate/instance.rb +16 -5
- data/lib/dominate/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5250f7b20a0370a8f8bbcc6f1c23567edfb01b49
|
4
|
+
data.tar.gz: b20458793cbdcd7601e64b36f664cbdea55aed32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: daa9476cfb24b1b1b96a8868b847bb049e295e0f98c3a8325d5e099a041f5c94f7557880838f105c785debfe76d53b350c12644032fa3ca4a278307867c7a252
|
7
|
+
data.tar.gz: b082ab2449e445033f1c31195b41352c025bb6abacda3624126ab583012dd3a79e9ae0a68521c12938d7067affe6c928f4f258c1ae70f000ed37ac0af68db40a
|
data/lib/dominate/instance.rb
CHANGED
@@ -1,10 +1,21 @@
|
|
1
1
|
module Dominate
|
2
|
-
class Instance
|
2
|
+
class Instance
|
3
|
+
def initialize instance, config
|
4
|
+
@__config__ = config
|
5
|
+
@__instance__ = instance
|
6
|
+
|
7
|
+
instance.instance_variables.each do |name|
|
8
|
+
instance_variable_set name, instance.instance_variable_get(name)
|
9
|
+
end
|
10
|
+
|
11
|
+
instance
|
12
|
+
end
|
13
|
+
|
3
14
|
def method_missing method, *args, &block
|
4
|
-
if
|
5
|
-
|
6
|
-
elsif
|
7
|
-
|
15
|
+
if @__config__.respond_to? method
|
16
|
+
@__config__.send method
|
17
|
+
elsif @__instance__.respond_to? method
|
18
|
+
@__instance__.send method
|
8
19
|
else
|
9
20
|
super
|
10
21
|
end
|
data/lib/dominate/version.rb
CHANGED