acts_as_living 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/acts_as_living/methods_definer.rb +14 -14
- data/lib/acts_as_living/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73d33885449af7caca352c2349ec8bb1897f01b6b3d6906b8dd414d4dda6d6c9
|
4
|
+
data.tar.gz: e8fc368946103d716e0c84132f9f84662f21ddbf392237de7f2309801c8f0f9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fca0d7f19165ac60768f58cb92c29f516b7746a8078fcadfb13176d5b7899d3a5acfe8018f638a0ea31256e89cbc24075aee378f4df5f33a0e9c7365612d05e
|
7
|
+
data.tar.gz: 07e876c5194830496f4bccbd9a6e849e59d102bc7607105152acbe01e197a6978f0194a2c1071f797a5b130bfb8e2ea5b6eda041d2ba2df863e50063382b3d73
|
@@ -52,8 +52,8 @@ module ActsAsLiving::MethodsDefiner
|
|
52
52
|
self.class.dying?(stage)
|
53
53
|
end
|
54
54
|
|
55
|
-
def
|
56
|
-
self.class.
|
55
|
+
def first_stage?
|
56
|
+
self.class.first_stage?(stage)
|
57
57
|
end
|
58
58
|
|
59
59
|
def dead?
|
@@ -115,7 +115,7 @@ module ActsAsLiving::MethodsDefiner
|
|
115
115
|
end
|
116
116
|
|
117
117
|
def stages_before(stage)
|
118
|
-
return [] if
|
118
|
+
return [] if first_stage?(stage)
|
119
119
|
|
120
120
|
index = stage_keys.find_index(stage)
|
121
121
|
stage_keys[0...index]
|
@@ -129,30 +129,30 @@ module ActsAsLiving::MethodsDefiner
|
|
129
129
|
end
|
130
130
|
|
131
131
|
def stage_before(stage)
|
132
|
-
return if
|
132
|
+
return if first_stage?(stage)
|
133
133
|
|
134
134
|
index = stage_keys.find_index(stage)
|
135
135
|
stage_keys[index - 1]
|
136
136
|
end
|
137
137
|
|
138
|
-
def
|
139
|
-
stage_keys.last
|
138
|
+
def last_stage
|
139
|
+
(stage_keys - %i[cancelled]).last
|
140
140
|
end
|
141
141
|
|
142
|
-
def
|
143
|
-
|
142
|
+
def last_stage?(stage)
|
143
|
+
last_stage == stage
|
144
144
|
end
|
145
145
|
|
146
|
-
def
|
147
|
-
stage_keys.first
|
146
|
+
def first_stage_stage
|
147
|
+
(stage_keys - %i[cancelled]).first
|
148
148
|
end
|
149
149
|
|
150
|
-
def
|
151
|
-
|
150
|
+
def first_stage?(stage)
|
151
|
+
first_stage_stage == stage
|
152
152
|
end
|
153
153
|
|
154
|
-
def
|
155
|
-
|
154
|
+
def death
|
155
|
+
@death
|
156
156
|
end
|
157
157
|
|
158
158
|
def phases_with_ranges
|