smooth_operator 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTBiYTliODQ1NDM1MGU5NjlkMTVhNGJiMTExNjY3YjU4YjgzODQ2OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDZkYjJmYTdlM2M3NmZmZmFlODVhMWZkNTBlNWQ1ZjNmZDg2YmY4YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmRkOTExMDUzY2QwNDQ0ZTYwNDk2Y2FhYTE0YzA0YzkyYzg1ZDYwNjhjMTBm
|
10
|
+
YzBiNzg5NDNlY2YxZTZjZThjNTljYmEwNTQwMjAwNGY5ZGI0YjE2MWFjNmVl
|
11
|
+
ODNiYWNhNDVjMzIyZjIzMTkxNGE1MDYyYmQ0YWEwNWZjNDA3YjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTFmMmNjOGYwZTNjN2ZhNzczMWE3OGRhMTYyYjFkOTVjM2ZlNTRlYTgyNDE4
|
14
|
+
NzJkYjZjMGI5MzU1NTliOWJlMGQ0M2QzYzg4MDI5NjhjMDIwNDVlNmZlOTBl
|
15
|
+
OWVkZjM2MzM1ODc4OTg1MmE3NWIzMmE1N2NhMTIxMTU5NmI5N2E=
|
@@ -2,13 +2,17 @@ module SmoothOperator
|
|
2
2
|
module Relation
|
3
3
|
class SingleRelation < ::SimpleDelegator
|
4
4
|
|
5
|
-
attr_reader :relation_name
|
5
|
+
attr_reader :object, :relation_name
|
6
6
|
|
7
7
|
def initialize(object, relation_name)
|
8
|
-
@relation_name = relation_name
|
8
|
+
@object, @relation_name = object, relation_name
|
9
9
|
super(object)
|
10
10
|
end
|
11
11
|
|
12
|
+
def persisted?
|
13
|
+
object.nil? ? false : object.persisted?
|
14
|
+
end
|
15
|
+
|
12
16
|
end
|
13
17
|
end
|
14
18
|
end
|