woody-decorators 8.3.0 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/woody/decorators/brief.rb +18 -4
- data/lib/woody/decorators.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f88a52175e7b6297b007a4364ac14637cc127047
|
4
|
+
data.tar.gz: a6f274ff5a071037a8623ac208e52f351ec57708
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64ad80afa875fe379fb6cd7d98e28bf33e3a95a8cb8318ed55438226d7d4d23aef7d846e23e41789658980eae1fbc88056b51c8e5958fb0fc0dae1b3fb11b46c
|
7
|
+
data.tar.gz: f8af226c02b8f14e1d0963c52c7fc1ac66ca71c4acc142166b0837e33612cde4238d5b6dc8b2a6bacb691e4a6ffc1a75c40e8a823e72f56fa364546aaddcb287
|
@@ -80,12 +80,26 @@ module Woody
|
|
80
80
|
)
|
81
81
|
end
|
82
82
|
|
83
|
-
def
|
84
|
-
|
83
|
+
def bonus_rewards
|
84
|
+
return @model.rewards.select do |r|
|
85
|
+
r.type == 'bonus'
|
86
|
+
end.inject(0) do |total, reward|
|
87
|
+
total + (reward.quantity * reward.amount)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
def creator_rewards
|
92
|
+
return @model.rewards.select do |r|
|
93
|
+
r.type == 'creator'
|
94
|
+
end.inject(0) do |total, reward|
|
95
|
+
total + (reward.quantity * reward.amount)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
def total_rewards
|
100
|
+
return @model.rewards.inject(0) do |total, reward|
|
85
101
|
total + (reward.quantity * reward.amount)
|
86
102
|
end
|
87
|
-
return 'SWAG 😎' if t == 0
|
88
|
-
format('£%d', t)
|
89
103
|
end
|
90
104
|
|
91
105
|
def status(submission = nil)
|
data/lib/woody/decorators.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: woody-decorators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 9.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|