rbs_rails 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/README.md +12 -0
- data/Rakefile +2 -1
- data/Steepfile +9 -1
- data/bin/add-type-params.rb +1 -1
- data/bin/postprocess.rb +1 -1
- data/bin/rbs +29 -2
- data/bin/rbs-prototype-rb.rb +54 -5
- data/lib/rbs_rails/active_record.rb +2 -0
- data/lib/rbs_rails/version.rb +1 -1
- metadata +4 -21
- data/assets/sig/action_controller.rbs +0 -49
- data/assets/sig/active_record.rbs +0 -137
- data/assets/sig/generated/actionpack.rbs +0 -11831
- data/assets/sig/generated/actionview.rbs +0 -10591
- data/assets/sig/generated/activejob.rbs +0 -1920
- data/assets/sig/generated/activemodel.rbs +0 -4214
- data/assets/sig/generated/activerecord-meta-programming.rbs +0 -98
- data/assets/sig/generated/activerecord.rbs +0 -24602
- data/assets/sig/generated/activesupport.rbs +0 -12613
- data/assets/sig/generated/railties.rbs +0 -4687
- data/assets/sig/patches/README.md +0 -4
- data/assets/sig/patches/for_actionpack.rbs +0 -74
- data/assets/sig/patches/for_actionview.rbs +0 -19
- data/assets/sig/patches/for_activemodel.rbs +0 -11
- data/assets/sig/patches/for_activerecord.rbs +0 -84
- data/assets/sig/patches/for_activesupport.rbs +0 -48
- data/assets/sig/patches/for_railties.rbs +0 -30
- data/bin/generate_rbs_from_rails_source_code.rb +0 -201
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 820a0b86c257e12194d883e6f5edda1793b54cb789c2b57da2e496e16041c803
|
4
|
+
data.tar.gz: 173abfdce9274fc34671198b7640f5e84a92c8b0bb1a7ede8224cd2fb851137d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 500bb14e66e9d6188d931e8a655b8af42b17caf13fa9487e8ad22318a54f34b5e05c412e65c2e68258d13165cb5760d09dc00d52d05b7cb9c9696e97dbbcc8bb
|
7
|
+
data.tar.gz: 86e1ec208cba577ce7ed5ac4a6b7bcd5ada10fe7d3ca0fd4ba5e014a68144bbe3182fcbd04145e9b9472be24a627eb0d5c3a2b7424661caae25d43507390d15a
|
data/.gitmodules
ADDED
data/README.md
CHANGED
@@ -83,13 +83,25 @@ target :app do
|
|
83
83
|
|
84
84
|
check 'app'
|
85
85
|
|
86
|
+
repo_path "path/to/rbs_repo"
|
87
|
+
|
86
88
|
library 'pathname'
|
87
89
|
library 'logger'
|
88
90
|
library 'mutex_m'
|
89
91
|
library 'date'
|
92
|
+
|
93
|
+
library 'activesupport'
|
94
|
+
library 'actionpack'
|
95
|
+
library 'activejob'
|
96
|
+
library 'activemodel'
|
97
|
+
library 'actionview'
|
98
|
+
library 'activerecord'
|
99
|
+
library 'railties'
|
90
100
|
end
|
91
101
|
```
|
92
102
|
|
103
|
+
You need to put RBS repo to `path/to/rbs_repo`. See https://github.com/ruby/gem_rbs
|
104
|
+
|
93
105
|
## Development
|
94
106
|
|
95
107
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/Rakefile
CHANGED
data/Steepfile
CHANGED
@@ -3,10 +3,18 @@ target :lib do
|
|
3
3
|
signature 'assets/sig'
|
4
4
|
|
5
5
|
check "lib" # Directory name
|
6
|
+
repo_path ENV['RBS_REPO_DIR'] || './gem_rbs/gems'
|
6
7
|
|
7
8
|
library "pathname"
|
8
9
|
library "logger"
|
9
10
|
library "mutex_m"
|
10
11
|
library "date"
|
11
|
-
|
12
|
+
|
13
|
+
library 'activesupport'
|
14
|
+
library 'actionpack'
|
15
|
+
library 'activejob'
|
16
|
+
library 'activemodel'
|
17
|
+
library 'actionview'
|
18
|
+
library 'activerecord'
|
19
|
+
library 'railties'
|
12
20
|
end
|
data/bin/add-type-params.rb
CHANGED
data/bin/postprocess.rb
CHANGED
data/bin/rbs
CHANGED
@@ -1,3 +1,30 @@
|
|
1
|
-
|
1
|
+
#!ruby
|
2
|
+
|
3
|
+
require 'pathname'
|
4
|
+
root = Pathname(__dir__) / '../'
|
5
|
+
|
6
|
+
def v(require)
|
7
|
+
if v = ENV['RAILS_VERSION']
|
8
|
+
"#{require}:#{v}"
|
9
|
+
else
|
10
|
+
require
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def repo
|
15
|
+
ENV['RBS_REPO_DIR'] || Pathname(__dir__).join('../gem_rbs/gems').to_s
|
16
|
+
end
|
17
|
+
|
18
|
+
exec(
|
19
|
+
'rbs',
|
20
|
+
# Require stdlibs
|
21
|
+
'-rlogger', '-rpathname', '-rmutex_m', '-rdate',
|
22
|
+
"--repo=#{repo}",
|
23
|
+
# Require Rails libraries
|
24
|
+
v('-ractivesupport'), v('-ractionpack'), v('-ractivejob'), v('-ractivemodel'), v('-ractionview'), v('-ractiverecord'), v('-rrailties'),
|
25
|
+
# Load signatures that are bundled in rbs_rails
|
26
|
+
'-I' + root.join('sig').to_s, '-I' + root.join('assets/sig').to_s,
|
27
|
+
# Expand arguments
|
28
|
+
*ARGV,
|
29
|
+
)
|
2
30
|
|
3
|
-
rbs -rlogger -rpathname -rmutex_m -rdate -Isig -Iassets/sig $@
|
data/bin/rbs-prototype-rb.rb
CHANGED
@@ -17,7 +17,7 @@ using Module.new {
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
def process_class_methods(node, decls:, comments:,
|
20
|
+
def process_class_methods(node, decls:, comments:, context:)
|
21
21
|
return false unless node.type == :ITER
|
22
22
|
|
23
23
|
fcall = node.children[0]
|
@@ -37,13 +37,13 @@ using Module.new {
|
|
37
37
|
decls.push mod
|
38
38
|
|
39
39
|
each_node [node.children[1]] do |child|
|
40
|
-
process child, decls: mod.members, comments: comments,
|
40
|
+
process child, decls: mod.members, comments: comments, context: RBS::Prototype::RB::Context.initial
|
41
41
|
end
|
42
42
|
|
43
43
|
true
|
44
44
|
end
|
45
45
|
|
46
|
-
def process_struct_new(node, decls:, comments:,
|
46
|
+
def process_struct_new(node, decls:, comments:, context:)
|
47
47
|
return unless node.type == :CDECL
|
48
48
|
|
49
49
|
name, *_, rhs = node.children
|
@@ -78,13 +78,62 @@ using Module.new {
|
|
78
78
|
|
79
79
|
if body
|
80
80
|
each_node [body] do |child|
|
81
|
-
process child, decls: kls.members, comments: comments,
|
81
|
+
process child, decls: kls.members, comments: comments, context: RBS::Prototype::RB::Context.initial
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
85
|
true
|
86
86
|
end
|
87
87
|
|
88
|
+
def process_attr_internal(node, decls:, comments:, context:)
|
89
|
+
case node.type
|
90
|
+
when :FCALL, :VCALL
|
91
|
+
args = node.children[1]&.children || []
|
92
|
+
|
93
|
+
case node.children[0]
|
94
|
+
when :attr_internal_reader
|
95
|
+
args.each do |arg|
|
96
|
+
if arg && (name = literal_to_symbol(arg))
|
97
|
+
decls << RBS::AST::Members::AttrReader.new(
|
98
|
+
name: name,
|
99
|
+
ivar_name: :"@_#{name}",
|
100
|
+
type: RBS::Types::Bases::Any.new(location: nil),
|
101
|
+
location: nil,
|
102
|
+
comment: comments[node.first_lineno - 1],
|
103
|
+
annotations: []
|
104
|
+
)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
when :attr_internal_writer
|
108
|
+
args.each do |arg|
|
109
|
+
if arg && (name = literal_to_symbol(arg))
|
110
|
+
decls << RBS::AST::Members::AttrWriter.new(
|
111
|
+
name: name,
|
112
|
+
ivar_name: :"@_#{name}",
|
113
|
+
type: RBS::Types::Bases::Any.new(location: nil),
|
114
|
+
location: nil,
|
115
|
+
comment: comments[node.first_lineno - 1],
|
116
|
+
annotations: []
|
117
|
+
)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
when :attr_internal_accessor, :attr_internal
|
121
|
+
args.each do |arg|
|
122
|
+
if arg && (name = literal_to_symbol(arg))
|
123
|
+
decls << RBS::AST::Members::AttrAccessor.new(
|
124
|
+
name: name,
|
125
|
+
ivar_name: :"@_#{name}",
|
126
|
+
type: RBS::Types::Bases::Any.new(location: nil),
|
127
|
+
location: nil,
|
128
|
+
comment: comments[node.first_lineno - 1],
|
129
|
+
annotations: []
|
130
|
+
)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
88
137
|
def class_new_method_to_type(node)
|
89
138
|
case node.type
|
90
139
|
when :CALL
|
@@ -129,7 +178,7 @@ using Module.new {
|
|
129
178
|
|
130
179
|
module PrototypeExt
|
131
180
|
def process(...)
|
132
|
-
process_class_methods(...) || process_struct_new(...) || super
|
181
|
+
process_class_methods(...) || process_struct_new(...) || process_attr_internal(...) || super
|
133
182
|
end
|
134
183
|
|
135
184
|
def literal_to_type(node)
|
@@ -154,6 +154,7 @@ module RbsRails
|
|
154
154
|
return [] unless ast
|
155
155
|
|
156
156
|
traverse(ast).map do |node|
|
157
|
+
# @type block: nil | Hash[untyped, untyped]
|
157
158
|
next unless node.type == :send
|
158
159
|
next unless node.children[0].nil?
|
159
160
|
next unless node.children[1] == :enum
|
@@ -192,6 +193,7 @@ module RbsRails
|
|
192
193
|
return '' unless ast
|
193
194
|
|
194
195
|
traverse(ast).map do |node|
|
196
|
+
# @type block: nil | String
|
195
197
|
next unless node.type == :send
|
196
198
|
next unless node.children[0].nil?
|
197
199
|
next unless node.children[1] == :scope
|
data/lib/rbs_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masataka Pocke Kuwabara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -46,39 +46,23 @@ extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
48
|
- ".gitignore"
|
49
|
+
- ".gitmodules"
|
49
50
|
- ".travis.yml"
|
50
51
|
- Gemfile
|
51
52
|
- LICENSE
|
52
53
|
- README.md
|
53
54
|
- Rakefile
|
54
55
|
- Steepfile
|
55
|
-
- assets/sig/action_controller.rbs
|
56
56
|
- assets/sig/action_mailer.rbs
|
57
|
-
- assets/sig/active_record.rbs
|
58
57
|
- assets/sig/builtin.rbs
|
59
58
|
- assets/sig/capybara.rbs
|
60
59
|
- assets/sig/concurrent.rbs
|
61
60
|
- assets/sig/erb.rbs
|
62
61
|
- assets/sig/erubi.rbs
|
63
|
-
- assets/sig/generated/actionpack.rbs
|
64
|
-
- assets/sig/generated/actionview.rbs
|
65
|
-
- assets/sig/generated/activejob.rbs
|
66
|
-
- assets/sig/generated/activemodel.rbs
|
67
|
-
- assets/sig/generated/activerecord-meta-programming.rbs
|
68
|
-
- assets/sig/generated/activerecord.rbs
|
69
|
-
- assets/sig/generated/activesupport.rbs
|
70
|
-
- assets/sig/generated/railties.rbs
|
71
62
|
- assets/sig/i18n.rbs
|
72
63
|
- assets/sig/libxml.rbs
|
73
64
|
- assets/sig/minitest.rbs
|
74
65
|
- assets/sig/nokogiri.rbs
|
75
|
-
- assets/sig/patches/README.md
|
76
|
-
- assets/sig/patches/for_actionpack.rbs
|
77
|
-
- assets/sig/patches/for_actionview.rbs
|
78
|
-
- assets/sig/patches/for_activemodel.rbs
|
79
|
-
- assets/sig/patches/for_activerecord.rbs
|
80
|
-
- assets/sig/patches/for_activesupport.rbs
|
81
|
-
- assets/sig/patches/for_railties.rbs
|
82
66
|
- assets/sig/pg.rbs
|
83
67
|
- assets/sig/que.rbs
|
84
68
|
- assets/sig/queue_classic.rbs
|
@@ -95,7 +79,6 @@ files:
|
|
95
79
|
- assets/sig/tzinfo.rbs
|
96
80
|
- bin/add-type-params.rb
|
97
81
|
- bin/console
|
98
|
-
- bin/generate_rbs_from_rails_source_code.rb
|
99
82
|
- bin/postprocess.rb
|
100
83
|
- bin/rbs
|
101
84
|
- bin/rbs-prototype-rb.rb
|
@@ -133,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
116
|
- !ruby/object:Gem::Version
|
134
117
|
version: '0'
|
135
118
|
requirements: []
|
136
|
-
rubygems_version: 3.2.
|
119
|
+
rubygems_version: 3.2.1
|
137
120
|
signing_key:
|
138
121
|
specification_version: 4
|
139
122
|
summary: A RBS files generator for Rails application
|
@@ -1,49 +0,0 @@
|
|
1
|
-
interface _ActionController_API_and_Base
|
2
|
-
def request: () -> untyped
|
3
|
-
def params: () -> untyped
|
4
|
-
def session: () -> untyped
|
5
|
-
def cookies: () -> untyped
|
6
|
-
def flash: () -> untyped
|
7
|
-
def render: (*untyped) -> void
|
8
|
-
def redirect_to: (*untyped) -> void
|
9
|
-
end
|
10
|
-
|
11
|
-
interface _ActionController_API_and_Base_singletion
|
12
|
-
# hooks
|
13
|
-
def before_action: (*untyped) -> void
|
14
|
-
def around_action: (*untyped) -> void
|
15
|
-
def after_action: (*untyped) -> void
|
16
|
-
def skip_before_action: (*untyped) -> void
|
17
|
-
def skip_around_action: (*untyped) -> void
|
18
|
-
def skip_after_action: (*untyped) -> void
|
19
|
-
def prepend_before_action: (*untyped) -> void
|
20
|
-
def prepend_around_action: (*untyped) -> void
|
21
|
-
def prepend_after_action: (*untyped) -> void
|
22
|
-
def append_before_action: (*untyped) -> void
|
23
|
-
def append_around_action: (*untyped) -> void
|
24
|
-
def append_after_action: (*untyped) -> void
|
25
|
-
|
26
|
-
def rescue_from: (*Class, ?with: Symbol | Proc) { (Exception) -> void } -> void
|
27
|
-
end
|
28
|
-
|
29
|
-
module AbstractController
|
30
|
-
class Base
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
module ActionController
|
35
|
-
class Metal < ::AbstractController::Base
|
36
|
-
end
|
37
|
-
|
38
|
-
class Base < Metal
|
39
|
-
include _ActionController_API_and_Base
|
40
|
-
extend _ActionController_API_and_Base_singletion
|
41
|
-
extend ::ActionView::Layouts::ClassMethods
|
42
|
-
end
|
43
|
-
|
44
|
-
class API < Metal
|
45
|
-
include _ActionController_API_and_Base
|
46
|
-
extend _ActionController_API_and_Base_singletion
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
@@ -1,137 +0,0 @@
|
|
1
|
-
module ActiveRecord
|
2
|
-
end
|
3
|
-
|
4
|
-
class ActiveRecord::Base
|
5
|
-
def self.abstract_class=: (bool) -> void
|
6
|
-
def self.scope: (Symbol, ^(*untyped) -> untyped ) -> void
|
7
|
-
| (Symbol) { (*untyped) -> untyped } -> void
|
8
|
-
def self.belongs_to: (Symbol, ?untyped, **untyped) -> void
|
9
|
-
def self.has_many: (Symbol, ?untyped, **untyped) -> void
|
10
|
-
def self.has_one: (Symbol, ?untyped, **untyped) -> void
|
11
|
-
def self.transaction: [T] () { () -> T } -> T
|
12
|
-
def self.create!: (**untyped) -> instance
|
13
|
-
def self.validate: (*untyped) -> void
|
14
|
-
def self.validates: (*untyped) -> void
|
15
|
-
def self.enum: (Hash[Symbol, untyped]) -> void
|
16
|
-
|
17
|
-
# callbacks
|
18
|
-
def self.after_commit: (*untyped) -> void
|
19
|
-
def self.after_create: (*untyped) -> void
|
20
|
-
def self.after_destroy: (*untyped) -> void
|
21
|
-
def self.after_rollback: (*untyped) -> void
|
22
|
-
def self.after_save: (*untyped) -> void
|
23
|
-
def self.after_update: (*untyped) -> void
|
24
|
-
def self.after_validation: (*untyped) -> void
|
25
|
-
def self.around_create: (*untyped) -> void
|
26
|
-
def self.around_destroy: (*untyped) -> void
|
27
|
-
def self.around_save: (*untyped) -> void
|
28
|
-
def self.around_update: (*untyped) -> void
|
29
|
-
def self.before_create: (*untyped) -> void
|
30
|
-
def self.before_destroy: (*untyped) -> void
|
31
|
-
def self.before_save: (*untyped) -> void
|
32
|
-
def self.before_update: (*untyped) -> void
|
33
|
-
def self.before_validation: (*untyped) -> void
|
34
|
-
|
35
|
-
def self.columns: () -> Array[untyped]
|
36
|
-
def self.reflect_on_all_associations: (?Symbol) -> Array[untyped]
|
37
|
-
|
38
|
-
def will_save_change_to_attribute?: (String | Symbol attr_name, ?from: untyped, ?to: untyped) -> bool
|
39
|
-
|
40
|
-
def save!: (?validate: bool, ?touch: bool) -> self
|
41
|
-
def save: () -> bool
|
42
|
-
def update!: (*untyped) -> self
|
43
|
-
def update: (*untyped) -> bool
|
44
|
-
def destroy!: () -> self
|
45
|
-
def destroy: () -> bool
|
46
|
-
def valid?: () -> bool
|
47
|
-
def invalid?: () -> bool
|
48
|
-
def errors: () -> untyped
|
49
|
-
def []: (Symbol) -> untyped
|
50
|
-
def []=: (Symbol, untyped) -> untyped
|
51
|
-
end
|
52
|
-
|
53
|
-
class ActiveRecord::Relation
|
54
|
-
end
|
55
|
-
|
56
|
-
class ActiveRecord::Associations::CollectionProxy
|
57
|
-
end
|
58
|
-
|
59
|
-
interface _ActiveRecord_Relation[Model]
|
60
|
-
def all: () -> self
|
61
|
-
def ids: () -> Array[Integer]
|
62
|
-
def none: () -> self
|
63
|
-
def pluck: (Symbol | String column) -> Array[untyped]
|
64
|
-
| (*Symbol | String columns) -> Array[Array[untyped]]
|
65
|
-
def where: (*untyped) -> self
|
66
|
-
def not: (*untyped) -> self
|
67
|
-
def exists?: (*untyped) -> bool
|
68
|
-
def order: (*untyped) -> self
|
69
|
-
def group: (*Symbol | String) -> untyped
|
70
|
-
def distinct: () -> self
|
71
|
-
def or: (self) -> self
|
72
|
-
def merge: (self) -> self
|
73
|
-
def joins: (*String | Symbol) -> self
|
74
|
-
| (Hash[untyped, untyped]) -> self
|
75
|
-
def left_joins: (*String | Symbol) -> self
|
76
|
-
| (Hash[untyped, untyped]) -> self
|
77
|
-
def left_outer_joins: (*String | Symbol) -> self
|
78
|
-
| (Hash[untyped, untyped]) -> self
|
79
|
-
def includes: (*String | Symbol) -> self
|
80
|
-
| (Hash[untyped, untyped]) -> self
|
81
|
-
def eager_load: (*String | Symbol) -> self
|
82
|
-
| (Hash[untyped, untyped]) -> self
|
83
|
-
def preload: (*String | Symbol) -> self
|
84
|
-
| (Hash[untyped, untyped]) -> self
|
85
|
-
def find_by: (*untyped) -> Model?
|
86
|
-
def find_by!: (*untyped) -> Model
|
87
|
-
def find: (Integer id) -> Model
|
88
|
-
def first: () -> Model
|
89
|
-
| (Integer count) -> Array[Model]
|
90
|
-
def last: () -> Model
|
91
|
-
| (Integer count) -> Array[Model]
|
92
|
-
def find_each: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Model) -> void } -> nil
|
93
|
-
def find_in_batches: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (self) -> void } -> nil
|
94
|
-
def destroy_all: () -> untyped
|
95
|
-
def delete_all: () -> untyped
|
96
|
-
def update_all: (*untyped) -> untyped
|
97
|
-
def each: () { (Model) -> void } -> self
|
98
|
-
end
|
99
|
-
|
100
|
-
interface _ActiveRecord_Relation_ClassMethods[Model, Relation]
|
101
|
-
def all: () -> Relation
|
102
|
-
def ids: () -> Array[Integer]
|
103
|
-
def none: () -> Relation
|
104
|
-
def pluck: (Symbol | String column) -> Array[untyped]
|
105
|
-
| (*Symbol | String columns) -> Array[Array[untyped]]
|
106
|
-
def where: (*untyped) -> Relation
|
107
|
-
def exists?: (*untyped) -> bool
|
108
|
-
def order: (*untyped) -> Relation
|
109
|
-
def group: (*Symbol | String) -> untyped
|
110
|
-
def distinct: () -> self
|
111
|
-
def or: (Relation) -> Relation
|
112
|
-
def merge: (Relation) -> Relation
|
113
|
-
def joins: (*String | Symbol) -> self
|
114
|
-
| (Hash[untyped, untyped]) -> self
|
115
|
-
def left_joins: (*String | Symbol) -> self
|
116
|
-
| (Hash[untyped, untyped]) -> self
|
117
|
-
def left_outer_joins: (*String | Symbol) -> self
|
118
|
-
| (Hash[untyped, untyped]) -> self
|
119
|
-
def includes: (*String | Symbol) -> self
|
120
|
-
| (Hash[untyped, untyped]) -> self
|
121
|
-
def eager_load: (*String | Symbol) -> self
|
122
|
-
| (Hash[untyped, untyped]) -> self
|
123
|
-
def preload: (*String | Symbol) -> self
|
124
|
-
| (Hash[untyped, untyped]) -> self
|
125
|
-
def find_by: (*untyped) -> Model?
|
126
|
-
def find_by!: (*untyped) -> Model
|
127
|
-
def find: (Integer id) -> Model
|
128
|
-
def first: () -> Model
|
129
|
-
| (Integer count) -> Array[Model]
|
130
|
-
def last: () -> Model
|
131
|
-
| (Integer count) -> Array[Model]
|
132
|
-
def find_each: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Model) -> void } -> nil
|
133
|
-
def find_in_batches: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (self) -> void } -> nil
|
134
|
-
def destroy_all: () -> untyped
|
135
|
-
def delete_all: () -> untyped
|
136
|
-
def update_all: (*untyped) -> untyped
|
137
|
-
end
|