expo 0.5.0 → 0.5.1
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.
- checksums.yaml +6 -14
- data/lib/expo2.rb +5 -5
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
metadata.gz: !binary |-
|
|
9
|
-
OTRkYzcxNDcyOWM0ZjcyNGMzNjkyMDFkZDkwOGE0OWZkNmM4MWE4N2IyOGJm
|
|
10
|
-
YjBlMWQ1ZjllMWZlZTk5MDdhMDNjZWJhMTBkZjliNjAyMWQwOWYwMDYzZjhk
|
|
11
|
-
MDk2ODM5YzdmNDNlZTc0MjI3NWIxZGEwOGI4YjBkNDM2YzRkODA=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
MDc3ZTEyZmQ3N2Y5MGE3Yzc5YjhhMjE3NzYwNGUwZjIyMDI1ZWFkM2Y2ODgy
|
|
14
|
-
YmY3ZGQ0ZTlkY2Y2NGI5N2NlODY4ZDhjMTJkZDJhODY3ODZlOTUyNjcxNGQ3
|
|
15
|
-
NTU5MTgzMGEyMjNiNzAxMmY4MjNkODE4NDU2MThkZmNiNzIxYjA=
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 122b7602adabe2bfe57a6819978b163863f0a36b
|
|
4
|
+
data.tar.gz: bba64649ec488d079b983f44e6c030c1951aea0a
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 9719150fbb7c992322080d0bf0e6b11648863e427913f3b8b929bd3bf6e31e48dae5841c5d6ff8187ebea664ade288202ca94f3cbe52d5cbbb20994e0d79b996
|
|
7
|
+
data.tar.gz: 69ca19352bce620a2bc112615bb59bdbc06d81cdf6017200a85d75606fe740f9f50726c4fcb6ee0d00f9a55598a1a356f6980d507d28db7e29eac62f8ee39d19
|
data/lib/expo2.rb
CHANGED
|
@@ -5,20 +5,20 @@ class Expo2
|
|
|
5
5
|
@prototype = prototype
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
-
def prototype_presenters
|
|
9
|
-
Array(@prototype && @prototype.go_presenters)
|
|
8
|
+
def prototype_presenters(object)
|
|
9
|
+
Array(@prototype && @prototype.go_presenters(object))
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
def go_presenters
|
|
12
|
+
def go_presenters(object)
|
|
13
13
|
self.instance_exec &@block if @block && !@built
|
|
14
14
|
# @built = true
|
|
15
|
-
@cache ||= (prototype_presenters + presenters)
|
|
15
|
+
@cache ||= (prototype_presenters(object) + presenters)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
def expo(object, context={}, index=nil)
|
|
19
19
|
return nil if object.nil?
|
|
20
20
|
preso = {}
|
|
21
|
-
go_presenters.each do |pres|
|
|
21
|
+
go_presenters(object).each do |pres|
|
|
22
22
|
preso.merge!(pres.go(object, context, index))
|
|
23
23
|
end
|
|
24
24
|
preso
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: expo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Serguei Filimonov
|
|
@@ -28,12 +28,12 @@ require_paths:
|
|
|
28
28
|
- lib
|
|
29
29
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- -
|
|
31
|
+
- - '>='
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '0'
|
|
34
34
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
35
35
|
requirements:
|
|
36
|
-
- -
|
|
36
|
+
- - '>='
|
|
37
37
|
- !ruby/object:Gem::Version
|
|
38
38
|
version: '0'
|
|
39
39
|
requirements: []
|