yard-activerecord 0.0.14 → 0.0.15
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6a2cdef66ce5045b9b2f59c88cdb12fd5d36997
|
4
|
+
data.tar.gz: 31c55cac390cc27cd0235f4e6e2cd74f74b3984c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3ad44d760371a0b95a7afc98c07925bd66520a4035dbfca7032200e31d7fa6940702ccf821c8b1add9b1ac0421cd830496373cc34b7e8719819ab68997be736
|
7
|
+
data.tar.gz: 57779d36bd415fa312273dc957da36041b9b588c4d7ec1ba0567ecf5b250e33b45cb3562ea98898823775c41291f38213584229880a8d5da6bba928751edf4cd
|
data/README.md
CHANGED
@@ -65,7 +65,7 @@ The documentation will then be skipped for this table/class.
|
|
65
65
|
The plugin handles `has_one`, `belongs_to`, `has_many` and
|
66
66
|
`has_and_belongs_to_many` associations. The annotation for each association
|
67
67
|
includes a link to the referred model. For associations with a list of objects
|
68
|
-
the documentation will simply be marked as `
|
68
|
+
the documentation will simply be marked as `ActiveRecord::Relation<ModelName>`.
|
69
69
|
|
70
70
|
## Delegates
|
71
71
|
|
@@ -3,12 +3,12 @@ require_relative 'base'
|
|
3
3
|
module YARD::Handlers::Ruby::ActiveRecord::Associations
|
4
4
|
class PluralHandler < Base
|
5
5
|
def class_name
|
6
|
-
"
|
6
|
+
"ActiveRecord::Relation<#{super(true)}>"
|
7
7
|
end
|
8
8
|
|
9
9
|
private
|
10
10
|
def return_description
|
11
|
-
"
|
11
|
+
"A relationship to the associated #{method_name.humanize} that can have further scopes chained on it or converted to an array with #to_a"
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -19,13 +19,13 @@ module YARD::Handlers::Ruby::ActiveRecord::Scopes
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def return_description
|
22
|
-
"
|
22
|
+
"A relation of #{ActiveSupport::Inflector.pluralize namespace.to_s} " +
|
23
23
|
"that are #{method_name.split('_').join(' ')}. " +
|
24
24
|
"<strong>Active Record Scope</strong>"
|
25
25
|
end
|
26
26
|
|
27
27
|
def class_name
|
28
|
-
"
|
28
|
+
"ActiveRecord::Relation<#{namespace}>"
|
29
29
|
end
|
30
30
|
|
31
31
|
def get_tag(tag, text, return_classes = [],name=nil)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Theodor Tonum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yard
|
@@ -99,3 +99,4 @@ signing_key:
|
|
99
99
|
specification_version: 4
|
100
100
|
summary: ActiveRecord Handlers for YARD
|
101
101
|
test_files: []
|
102
|
+
has_rdoc:
|