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
- ZDVjYjVmMmQ5NDBjMjM3ZDFhODA0Y2FlODhmNzAxYmU2ZjJhMWU3Nw==
4
+ MTBiYTliODQ1NDM1MGU5NjlkMTVhNGJiMTExNjY3YjU4YjgzODQ2OA==
5
5
  data.tar.gz: !binary |-
6
- MjhlNzJlYTA1YTc4OTgxYzlkZTUyOTczN2M3NDY2NzdhZGQ0YzczZQ==
6
+ MDZkYjJmYTdlM2M3NmZmZmFlODVhMWZkNTBlNWQ1ZjNmZDg2YmY4YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzgxZjhhZTYzNjMxZmZiYmIyOWUzODAzYjg4OGUwYzgxOTRiMmUxMjJhZTIx
10
- ODE1NTRhYTg2NmE4OTY1ZGExNzUyYzFjZTM5NjU2ZjljOWJiMGExNmMxNmJj
11
- YTEyYmY0NDAxMzc4ZTQxNmJlYjMyMGM1ODJmOThhOTdhNTcxYzI=
9
+ YmRkOTExMDUzY2QwNDQ0ZTYwNDk2Y2FhYTE0YzA0YzkyYzg1ZDYwNjhjMTBm
10
+ YzBiNzg5NDNlY2YxZTZjZThjNTljYmEwNTQwMjAwNGY5ZGI0YjE2MWFjNmVl
11
+ ODNiYWNhNDVjMzIyZjIzMTkxNGE1MDYyYmQ0YWEwNWZjNDA3YjE=
12
12
  data.tar.gz: !binary |-
13
- YmNiZThmOGQyZTI5OWU5MTZiMTAwMjNjOTI5YTdhNmEzZWNhMTdjM2MwNDgz
14
- Nzg1MzM2ZWRlODEwYmY1ZDY2OGRiNTBkMDhiYmJiM2UwMDAxZjVhN2JkYTQ0
15
- NjNiNGU1N2ZkYWEwMWI3YmY4NGMyNjU5NWQ2MDkwMjJlZTdlNzk=
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
@@ -1,3 +1,3 @@
1
1
  module SmoothOperator
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smooth_operator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - João Gonçalves