representable 1.7.4 → 1.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +1 -1
- data/lib/representable.rb +2 -2
- data/lib/representable/decorator.rb +1 -1
- data/lib/representable/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: 44bab0e189f2c4890389b5e7fbfdea850a4f3279
|
4
|
+
data.tar.gz: 073892bb5e3a2da25b63f467f288e540e268e572
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2448f7cda7ea75e85a800fdfe99ffbfa394dc0ff69cdcdab36d02446987ef47c9e627f0477c27e9467558a08fa5d8d31c28bb42c31c1854c4c5d21b0fe33ce72
|
7
|
+
data.tar.gz: 14f0bdb50cd844606957ea6e8ad3555e98f7bb5b2350aa6b3e1767f005ab3f44303d3d54ba6ca9344e20ba2bbeda1fe977771ca3f6da3bda13ac87c8efe510a6
|
data/CHANGES.md
CHANGED
data/lib/representable.rb
CHANGED
@@ -155,7 +155,7 @@ private
|
|
155
155
|
def property(name, options={}, &block)
|
156
156
|
return super unless block_given?
|
157
157
|
|
158
|
-
inline = inline_representer(representer_engine, &block)
|
158
|
+
inline = inline_representer(representer_engine, name, options, &block)
|
159
159
|
inline.module_eval { include options[:extend] } if options[:extend]
|
160
160
|
|
161
161
|
options[:extend] = inline
|
@@ -163,7 +163,7 @@ private
|
|
163
163
|
end
|
164
164
|
|
165
165
|
private
|
166
|
-
def inline_representer(base_module, &block) # DISCUSS: separate module?
|
166
|
+
def inline_representer(base_module, name, options, &block) # DISCUSS: separate module?
|
167
167
|
Module.new do
|
168
168
|
include base_module
|
169
169
|
instance_exec &block
|
@@ -7,7 +7,7 @@ module Representable
|
|
7
7
|
new(represented)
|
8
8
|
end
|
9
9
|
|
10
|
-
def self.inline_representer(base_module, &block) # DISCUSS: separate module?
|
10
|
+
def self.inline_representer(base_module, name, options, &block) # DISCUSS: separate module?
|
11
11
|
Class.new(self) do
|
12
12
|
include base_module
|
13
13
|
instance_exec &block
|