object_attorney 2.2.9 → 2.2.10
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 +8 -8
- data/lib/object_attorney/reflection.rb +6 -1
- data/lib/object_attorney/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
ZDAxYWFmNjYzNmRjNTFhYzlkMzg3YTQ4ODdkOTBhZWQ1ZTU4MmQxMg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
Y2UzMDRjMWY2NmM5Y2RkOTZlZDg2MjFiYzBhOGQ5MDlmMjFkNjVmYQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NjRkMDgwZmVkZTM3MzNjMjIwMzY4MWUwMTE1ZDQzYjRmZTgyYzNlNWRhNjJk
|
|
10
|
+
NGIwOTk1OWVmMjhlZDEyYzJmYTQxYTFjZDZjN2E1Njg5YjQwMGFjMDFkNjQx
|
|
11
|
+
ZDI1NGRjMzkwZWM0NzkxOGMzNzMyNWQ3N2YzZjA3Yzg3YTk2YTM=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
NWJkZjBiYmEzNWEyNjM3NWMxNzZhYWRkYjA4NDc5MDc0ZDQyMTNiZjJmMDdk
|
|
14
|
+
ZTcyZDA3YWM0MWY2OWViNGU1ZDNlYTRmNGIxMDhkNjlkMGExYTVjMzkxZWI3
|
|
15
|
+
NWZiMjMyZjA3NjFhOTk5ZTRkNGRkZmNlYWFiYWMyYmFkZTRjOTk=
|
|
@@ -18,7 +18,7 @@ module ObjectAttorney
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def single_name
|
|
21
|
-
@single_name ||= options[:single_name] ||
|
|
21
|
+
@single_name ||= options[:single_name] || single_name_default
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def plural_name
|
|
@@ -27,6 +27,11 @@ module ObjectAttorney
|
|
|
27
27
|
|
|
28
28
|
private ################################# private
|
|
29
29
|
|
|
30
|
+
def single_name_default
|
|
31
|
+
class_name = name.to_s
|
|
32
|
+
Helpers.plural?(class_name) ? class_name.singularize : class_name
|
|
33
|
+
end
|
|
34
|
+
|
|
30
35
|
def klass_default(class_name)
|
|
31
36
|
if Helpers.plural?(class_name)
|
|
32
37
|
class_name.to_s.singularize.camelize
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: object_attorney
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.
|
|
4
|
+
version: 2.2.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- João Gonçalves
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-01-
|
|
11
|
+
date: 2014-01-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -157,4 +157,3 @@ test_files:
|
|
|
157
157
|
- spec/support/models/comment.rb
|
|
158
158
|
- spec/support/models/post.rb
|
|
159
159
|
- spec/support/models/user.rb
|
|
160
|
-
has_rdoc:
|