packwerk 2.1.1 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +29 -20
- data/.github/workflows/cla.yml +22 -0
- data/.rubocop.yml +48 -19
- data/Gemfile +7 -2
- data/Gemfile.lock +204 -177
- data/README.md +7 -2
- data/RESOLVING_VIOLATIONS.md +81 -0
- data/Rakefile +1 -1
- data/USAGE.md +14 -5
- data/bin/m +1 -1
- data/bin/rake +1 -1
- data/bin/rubocop +1 -1
- data/bin/srb +1 -1
- data/bin/tapioca +1 -1
- data/gemfiles/Gemfile-rails-6-0 +1 -1
- data/gemfiles/Gemfile-rails-6-1 +22 -0
- data/lib/packwerk/application_load_paths.rb +12 -18
- data/lib/packwerk/application_validator.rb +7 -6
- data/lib/packwerk/association_inspector.rb +17 -15
- data/lib/packwerk/cache.rb +36 -29
- data/lib/packwerk/cli.rb +14 -8
- data/lib/packwerk/const_node_inspector.rb +8 -7
- data/lib/packwerk/constant_name_inspector.rb +2 -2
- data/lib/packwerk/deprecated_references.rb +34 -19
- data/lib/packwerk/file_processor.rb +25 -23
- data/lib/packwerk/files_for_processing.rb +33 -35
- data/lib/packwerk/formatters/offenses_formatter.rb +3 -3
- data/lib/packwerk/formatters/progress_formatter.rb +2 -2
- data/lib/packwerk/node.rb +1 -294
- data/lib/packwerk/node_helpers.rb +335 -0
- data/lib/packwerk/node_processor.rb +6 -5
- data/lib/packwerk/node_processor_factory.rb +3 -3
- data/lib/packwerk/node_visitor.rb +1 -1
- data/lib/packwerk/offense_collection.rb +6 -3
- data/lib/packwerk/offenses_formatter.rb +2 -2
- data/lib/packwerk/package.rb +3 -0
- data/lib/packwerk/package_set.rb +3 -1
- data/lib/packwerk/parse_run.rb +15 -13
- data/lib/packwerk/parsed_constant_definitions.rb +23 -20
- data/lib/packwerk/parsers/erb.rb +3 -3
- data/lib/packwerk/parsers/parser_interface.rb +2 -0
- data/lib/packwerk/reference_checking/checkers/checker.rb +16 -3
- data/lib/packwerk/reference_checking/checkers/dependency_checker.rb +16 -0
- data/lib/packwerk/reference_checking/checkers/privacy_checker.rb +18 -0
- data/lib/packwerk/reference_checking/reference_checker.rb +4 -4
- data/lib/packwerk/reference_extractor.rb +51 -54
- data/lib/packwerk/reference_offense.rb +3 -27
- data/lib/packwerk/run_context.rb +9 -7
- data/lib/packwerk/spring_command.rb +1 -1
- data/lib/packwerk/version.rb +1 -1
- data/lib/packwerk.rb +1 -0
- data/packwerk.gemspec +4 -11
- data/sorbet/rbi/gems/actioncable@7.0.3.1.rbi +2754 -0
- data/sorbet/rbi/gems/actionmailbox@7.0.3.1.rbi +1496 -0
- data/sorbet/rbi/gems/actionmailer@7.0.3.1.rbi +2362 -0
- data/sorbet/rbi/gems/actionpack@7.0.3.1.rbi +19397 -0
- data/sorbet/rbi/gems/actiontext@7.0.3.1.rbi +1569 -0
- data/sorbet/rbi/gems/actionview@7.0.3.1.rbi +14907 -0
- data/sorbet/rbi/gems/activejob@7.0.3.1.rbi +2553 -0
- data/sorbet/rbi/gems/activemodel@7.0.3.1.rbi +5999 -0
- data/sorbet/rbi/gems/activerecord@7.0.3.1.rbi +37832 -0
- data/sorbet/rbi/gems/activestorage@7.0.3.1.rbi +2321 -0
- data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +18818 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +11722 -0
- data/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +90 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
- data/sorbet/rbi/gems/digest@3.1.0.rbi +189 -0
- data/sorbet/rbi/gems/erubi@1.11.0.rbi +140 -0
- data/sorbet/rbi/gems/globalid@1.0.0.rbi +572 -0
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
- data/sorbet/rbi/gems/json@2.6.2.rbi +1548 -0
- data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +8 -0
- data/sorbet/rbi/gems/loofah@2.18.0.rbi +877 -0
- data/sorbet/rbi/gems/m@1.6.0.rbi +257 -0
- data/sorbet/rbi/gems/marcel@1.0.2.rbi +220 -0
- data/sorbet/rbi/gems/mini_mime@1.1.2.rbi +170 -0
- data/sorbet/rbi/gems/mini_portile2@2.8.0.rbi +8 -0
- data/sorbet/rbi/gems/minitest-focus@1.3.1.rbi +104 -0
- data/sorbet/rbi/gems/minitest@5.16.2.rbi +2136 -0
- data/sorbet/rbi/gems/mocha@1.14.0.rbi +4177 -0
- data/sorbet/rbi/gems/net-imap@0.2.3.rbi +2147 -0
- data/sorbet/rbi/gems/net-pop@0.1.1.rbi +926 -0
- data/sorbet/rbi/gems/net-protocol@0.1.3.rbi +11 -0
- data/sorbet/rbi/gems/net-smtp@0.3.1.rbi +1108 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +153 -0
- data/sorbet/rbi/gems/nio4r@2.5.8.rbi +292 -0
- data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +6478 -0
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
- data/sorbet/rbi/gems/parser@3.1.2.1.rbi +9029 -0
- data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +8 -0
- data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
- data/sorbet/rbi/gems/racc@1.6.0.rbi +152 -0
- data/sorbet/rbi/gems/rack-test@2.0.2.rbi +953 -0
- data/sorbet/rbi/gems/rack@2.2.4.rbi +5636 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +688 -0
- data/sorbet/rbi/gems/rails@7.0.3.1.rbi +8 -0
- data/sorbet/rbi/gems/railties@7.0.3.1.rbi +3507 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +392 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +2924 -0
- data/sorbet/rbi/gems/rbi@0.0.15.rbi +3007 -0
- data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +3383 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +4714 -0
- data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +6961 -0
- data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +2986 -0
- data/sorbet/rbi/gems/{rubocop-shopify@2.0.1.rbi → rubocop-shopify@2.9.0.rbi} +4 -4
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +992 -0
- data/sorbet/rbi/gems/rubocop@1.34.1.rbi +51820 -0
- data/sorbet/rbi/gems/ruby-lsp@0.2.1.rbi +11 -0
- data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +474 -0
- data/sorbet/rbi/gems/spoom@1.1.11.rbi +2181 -0
- data/sorbet/rbi/gems/spring@4.0.0.rbi +411 -0
- data/sorbet/rbi/gems/strscan@3.0.4.rbi +8 -0
- data/sorbet/rbi/gems/syntax_tree@3.3.0.rbi +8 -0
- data/sorbet/rbi/gems/tapioca@0.9.2.rbi +3181 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
- data/sorbet/rbi/gems/timeout@0.3.0.rbi +142 -0
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +5896 -0
- data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +48 -0
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +4529 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +2582 -0
- data/sorbet/rbi/gems/websocket-driver@0.7.5.rbi +993 -0
- data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +388 -0
- data/sorbet/rbi/gems/yard@0.9.28.rbi +18242 -0
- data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +867 -0
- data/sorbet/rbi/shims/psych.rbi +5 -0
- data/sorbet/tapioca/require.rb +2 -3
- metadata +88 -143
- data/.github/probots.yml +0 -2
- data/library.yml +0 -6
- data/service.yml +0 -1
- data/sorbet/rbi/gems/actioncable@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -860
- data/sorbet/rbi/gems/actionmailbox@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -568
- data/sorbet/rbi/gems/actionmailer@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -587
- data/sorbet/rbi/gems/actionpack@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -5314
- data/sorbet/rbi/gems/actiontext@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -699
- data/sorbet/rbi/gems/actionview@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -2515
- data/sorbet/rbi/gems/activejob@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -624
- data/sorbet/rbi/gems/activemodel@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -1248
- data/sorbet/rbi/gems/activerecord@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -8363
- data/sorbet/rbi/gems/activestorage@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -876
- data/sorbet/rbi/gems/activesupport@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -3987
- data/sorbet/rbi/gems/colorize@0.8.1.rbi +0 -40
- data/sorbet/rbi/gems/commander@4.5.2.rbi +0 -8
- data/sorbet/rbi/gems/concurrent-ruby@1.1.8.rbi +0 -1969
- data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +0 -26
- data/sorbet/rbi/gems/erubi@1.10.0.rbi +0 -41
- data/sorbet/rbi/gems/globalid@0.4.2.rbi +0 -178
- data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -8
- data/sorbet/rbi/gems/i18n@1.8.10.rbi +0 -600
- data/sorbet/rbi/gems/loofah@2.9.0.rbi +0 -274
- data/sorbet/rbi/gems/m@1.5.1.rbi +0 -108
- data/sorbet/rbi/gems/marcel@1.0.0.rbi +0 -70
- data/sorbet/rbi/gems/mini_mime@1.0.3.rbi +0 -71
- data/sorbet/rbi/gems/minitest-focus@1.2.1.rbi +0 -8
- data/sorbet/rbi/gems/minitest@5.14.4.rbi +0 -544
- data/sorbet/rbi/gems/mocha@1.12.0.rbi +0 -953
- data/sorbet/rbi/gems/nio4r@2.5.7.rbi +0 -90
- data/sorbet/rbi/gems/nokogiri@1.11.2.rbi +0 -1647
- data/sorbet/rbi/gems/parallel@1.20.1.rbi +0 -117
- data/sorbet/rbi/gems/parlour@6.0.0.rbi +0 -1272
- data/sorbet/rbi/gems/parser@3.0.0.0.rbi +0 -1745
- data/sorbet/rbi/gems/pry@0.14.0.rbi +0 -8
- data/sorbet/rbi/gems/psych@3.3.2.rbi +0 -24
- data/sorbet/rbi/gems/racc@1.5.2.rbi +0 -57
- data/sorbet/rbi/gems/rack-test@1.1.0.rbi +0 -335
- data/sorbet/rbi/gems/rack@2.2.3.rbi +0 -1718
- data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +0 -213
- data/sorbet/rbi/gems/rails@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -8
- data/sorbet/rbi/gems/railties@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -880
- data/sorbet/rbi/gems/rainbow@3.0.0.rbi +0 -155
- data/sorbet/rbi/gems/rake@13.0.3.rbi +0 -837
- data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +0 -8
- data/sorbet/rbi/gems/rexml@3.2.4.rbi +0 -8
- data/sorbet/rbi/gems/rubocop-ast@1.4.1.rbi +0 -8
- data/sorbet/rbi/gems/rubocop-performance@1.10.2.rbi +0 -8
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.1.rbi +0 -8
- data/sorbet/rbi/gems/rubocop@1.12.0.rbi +0 -8
- data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +0 -168
- data/sorbet/rbi/gems/spoom@1.1.0.rbi +0 -1061
- data/sorbet/rbi/gems/spring@2.1.1.rbi +0 -160
- data/sorbet/rbi/gems/sprockets-rails@3.2.2.rbi +0 -451
- data/sorbet/rbi/gems/sprockets@4.0.2.rbi +0 -1133
- data/sorbet/rbi/gems/tapioca@0.4.19.rbi +0 -603
- data/sorbet/rbi/gems/thor@1.1.0.rbi +0 -893
- data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +0 -566
- data/sorbet/rbi/gems/unicode-display_width@2.0.0.rbi +0 -8
- data/sorbet/rbi/gems/websocket-driver@0.7.3.rbi +0 -438
- data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +0 -177
@@ -0,0 +1,11 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `ruby-lsp` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem ruby-lsp`.
|
6
|
+
|
7
|
+
# source://ruby-lsp-0.2.1/lib/ruby-lsp.rb:4
|
8
|
+
module RubyLsp; end
|
9
|
+
|
10
|
+
# source://ruby-lsp-0.2.1/lib/ruby-lsp.rb:5
|
11
|
+
RubyLsp::VERSION = T.let(T.unsafe(nil), String)
|
@@ -0,0 +1,474 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `smart_properties` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem smart_properties`.
|
6
|
+
|
7
|
+
# {SmartProperties} can be used to easily build more full-fledged accessors
|
8
|
+
# for standard Ruby classes. In contrast to regular accessors,
|
9
|
+
# {SmartProperties} support validation and conversion of input data, as well
|
10
|
+
# as, the specification of default values. Additionally, individual
|
11
|
+
# {SmartProperties} can be marked as required. This causes the runtime to
|
12
|
+
# throw an +ArgumentError+ whenever a required property has not been
|
13
|
+
# specified.
|
14
|
+
#
|
15
|
+
# In order to use {SmartProperties}, simply include the {SmartProperties}
|
16
|
+
# module and use the {ClassMethods#property} method to define properties.
|
17
|
+
#
|
18
|
+
# @example Definition of a property that makes use of all {SmartProperties} features.
|
19
|
+
#
|
20
|
+
# property :language_code, :accepts => [:de, :en],
|
21
|
+
# :converts => :to_sym,
|
22
|
+
# :default => :de,
|
23
|
+
# :required => true
|
24
|
+
# @see ClassMethods#property More information on how to configure properties
|
25
|
+
#
|
26
|
+
# source://smart_properties-1.17.0/lib/smart_properties.rb:23
|
27
|
+
module SmartProperties
|
28
|
+
mixes_in_class_methods ::SmartProperties::ClassMethods
|
29
|
+
|
30
|
+
# Implements a key-value enabled constructor that acts as default
|
31
|
+
# constructor for all {SmartProperties}-enabled classes. Positional arguments
|
32
|
+
# or keyword arguments that do not correspond to a property are forwarded to
|
33
|
+
# the super class constructor.
|
34
|
+
#
|
35
|
+
# @param attrs [Hash] the set of attributes that is used for initialization
|
36
|
+
# @raise [SmartProperties::ConstructorArgumentForwardingError] when unknown arguments were supplied that could not be processed by the super class initializer either.
|
37
|
+
# @raise [SmartProperties::InitializationError] when incorrect values were supplied or required values weren't been supplied.
|
38
|
+
#
|
39
|
+
# source://smart_properties-1.17.0/lib/smart_properties.rb:127
|
40
|
+
def initialize(*args, &block); end
|
41
|
+
|
42
|
+
# source://smart_properties-1.17.0/lib/smart_properties.rb:165
|
43
|
+
def [](name); end
|
44
|
+
|
45
|
+
# source://smart_properties-1.17.0/lib/smart_properties.rb:172
|
46
|
+
def []=(name, value); end
|
47
|
+
|
48
|
+
class << self
|
49
|
+
private
|
50
|
+
|
51
|
+
# Extends the class, which this module is included in, with a property
|
52
|
+
# method to define properties.
|
53
|
+
#
|
54
|
+
# @param base [Class] the class this module is included in
|
55
|
+
#
|
56
|
+
# source://smart_properties-1.17.0/lib/smart_properties.rb:110
|
57
|
+
def included(base); end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:5
|
62
|
+
class SmartProperties::AssignmentError < ::SmartProperties::Error
|
63
|
+
# @return [AssignmentError] a new instance of AssignmentError
|
64
|
+
#
|
65
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:9
|
66
|
+
def initialize(sender, property, message); end
|
67
|
+
|
68
|
+
# Returns the value of attribute property.
|
69
|
+
#
|
70
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:7
|
71
|
+
def property; end
|
72
|
+
|
73
|
+
# Sets the attribute property
|
74
|
+
#
|
75
|
+
# @param value the value to set the attribute property to.
|
76
|
+
#
|
77
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:7
|
78
|
+
def property=(_arg0); end
|
79
|
+
|
80
|
+
# Returns the value of attribute sender.
|
81
|
+
#
|
82
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:6
|
83
|
+
def sender; end
|
84
|
+
|
85
|
+
# Sets the attribute sender
|
86
|
+
#
|
87
|
+
# @param value the value to set the attribute sender to.
|
88
|
+
#
|
89
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:6
|
90
|
+
def sender=(_arg0); end
|
91
|
+
end
|
92
|
+
|
93
|
+
# source://smart_properties-1.17.0/lib/smart_properties.rb:24
|
94
|
+
module SmartProperties::ClassMethods
|
95
|
+
# Returns a class's smart properties. This includes the properties that
|
96
|
+
# have been defined in the parent classes.
|
97
|
+
#
|
98
|
+
# @return [Hash<String, Property>] A map of property names to property instances.
|
99
|
+
#
|
100
|
+
# source://smart_properties-1.17.0/lib/smart_properties.rb:31
|
101
|
+
def properties; end
|
102
|
+
|
103
|
+
protected
|
104
|
+
|
105
|
+
# Defines a new property from a name and a set of options. This results
|
106
|
+
# results in creating an accessor that has additional features:
|
107
|
+
#
|
108
|
+
# 1. Validation of input data by specifiying the +:accepts+ option:
|
109
|
+
# If you use a class as value for this option, the setter will check
|
110
|
+
# if the value it is about to assign is of this type. If you use an
|
111
|
+
# array, the setter will check if the value it is about to assign is
|
112
|
+
# included in this array. Finally, if you specify a block, it will
|
113
|
+
# invoke the block with the value it is about to assign and check if
|
114
|
+
# the block returns a thruthy value, meaning anything but +false+ and
|
115
|
+
# +nil+.
|
116
|
+
#
|
117
|
+
# 2. Conversion of input data by specifiying the +:converts+ option:
|
118
|
+
# If you use provide a symbol as value for this option, the setter will
|
119
|
+
# invoke this method on the object it is about to assign and take the
|
120
|
+
# result of this call instead. If you provide a block, it will invoke
|
121
|
+
# the block with the value it is about to assign and take the result
|
122
|
+
# of the block instead.
|
123
|
+
#
|
124
|
+
# 3. Providing a default value by specifiying the +:default+ option.
|
125
|
+
#
|
126
|
+
# 4. Forcing a property to be present by setting the +:required+ option
|
127
|
+
# to true.
|
128
|
+
#
|
129
|
+
# @example Definition of a property that makes use of all {SmartProperties} features.
|
130
|
+
#
|
131
|
+
# property :language_code, :accepts => [:de, :en],
|
132
|
+
# :converts => :to_sym,
|
133
|
+
# :default => :de,
|
134
|
+
# :required => true
|
135
|
+
# @option options
|
136
|
+
# @option options
|
137
|
+
# @option options
|
138
|
+
# @option options
|
139
|
+
# @param name [Symbol] the name of the property
|
140
|
+
# @param options [Hash] the list of options used to configure the property
|
141
|
+
# @return [Property] The defined property.
|
142
|
+
#
|
143
|
+
# source://smart_properties-1.17.0/lib/smart_properties.rb:82
|
144
|
+
def property(name, **options); end
|
145
|
+
|
146
|
+
# source://smart_properties-1.17.0/lib/smart_properties.rb:87
|
147
|
+
def property!(name, **options); end
|
148
|
+
end
|
149
|
+
|
150
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:3
|
151
|
+
class SmartProperties::ConfigurationError < ::SmartProperties::Error; end
|
152
|
+
|
153
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:16
|
154
|
+
class SmartProperties::ConstructorArgumentForwardingError < ::SmartProperties::Error
|
155
|
+
# @return [ConstructorArgumentForwardingError] a new instance of ConstructorArgumentForwardingError
|
156
|
+
#
|
157
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:17
|
158
|
+
def initialize(positional_arguments, keyword_arguments); end
|
159
|
+
|
160
|
+
private
|
161
|
+
|
162
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:33
|
163
|
+
def generate_description(argument_type, argument_number); end
|
164
|
+
end
|
165
|
+
|
166
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:2
|
167
|
+
class SmartProperties::Error < ::ArgumentError; end
|
168
|
+
|
169
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:95
|
170
|
+
class SmartProperties::InitializationError < ::SmartProperties::Error
|
171
|
+
# @return [InitializationError] a new instance of InitializationError
|
172
|
+
#
|
173
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:99
|
174
|
+
def initialize(sender, properties); end
|
175
|
+
|
176
|
+
# Returns the value of attribute properties.
|
177
|
+
#
|
178
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:97
|
179
|
+
def properties; end
|
180
|
+
|
181
|
+
# Sets the attribute properties
|
182
|
+
#
|
183
|
+
# @param value the value to set the attribute properties to.
|
184
|
+
#
|
185
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:97
|
186
|
+
def properties=(_arg0); end
|
187
|
+
|
188
|
+
# Returns the value of attribute sender.
|
189
|
+
#
|
190
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:96
|
191
|
+
def sender; end
|
192
|
+
|
193
|
+
# Sets the attribute sender
|
194
|
+
#
|
195
|
+
# @param value the value to set the attribute sender to.
|
196
|
+
#
|
197
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:96
|
198
|
+
def sender=(_arg0); end
|
199
|
+
|
200
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:110
|
201
|
+
def to_hash; end
|
202
|
+
end
|
203
|
+
|
204
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:62
|
205
|
+
class SmartProperties::InvalidValueError < ::SmartProperties::AssignmentError
|
206
|
+
# @return [InvalidValueError] a new instance of InvalidValueError
|
207
|
+
#
|
208
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:65
|
209
|
+
def initialize(sender, property, value); end
|
210
|
+
|
211
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:80
|
212
|
+
def to_hash; end
|
213
|
+
|
214
|
+
# Returns the value of attribute value.
|
215
|
+
#
|
216
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:63
|
217
|
+
def value; end
|
218
|
+
|
219
|
+
# Sets the attribute value
|
220
|
+
#
|
221
|
+
# @param value the value to set the attribute value to.
|
222
|
+
#
|
223
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:63
|
224
|
+
def value=(_arg0); end
|
225
|
+
|
226
|
+
private
|
227
|
+
|
228
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:86
|
229
|
+
def accepter_message(sender, property); end
|
230
|
+
end
|
231
|
+
|
232
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:45
|
233
|
+
class SmartProperties::MissingValueError < ::SmartProperties::AssignmentError
|
234
|
+
# @return [MissingValueError] a new instance of MissingValueError
|
235
|
+
#
|
236
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:46
|
237
|
+
def initialize(sender, property); end
|
238
|
+
|
239
|
+
# source://smart_properties-1.17.0/lib/smart_properties/errors.rb:57
|
240
|
+
def to_hash; end
|
241
|
+
end
|
242
|
+
|
243
|
+
# source://smart_properties-1.17.0/lib/smart_properties.rb:94
|
244
|
+
module SmartProperties::ModuleMethods
|
245
|
+
# source://smart_properties-1.17.0/lib/smart_properties.rb:95
|
246
|
+
def included(target); end
|
247
|
+
end
|
248
|
+
|
249
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:2
|
250
|
+
class SmartProperties::Property
|
251
|
+
# @return [Property] a new instance of Property
|
252
|
+
#
|
253
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:17
|
254
|
+
def initialize(name, **attrs); end
|
255
|
+
|
256
|
+
# Returns the value of attribute accepter.
|
257
|
+
#
|
258
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:8
|
259
|
+
def accepter; end
|
260
|
+
|
261
|
+
# @return [Boolean]
|
262
|
+
#
|
263
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:78
|
264
|
+
def accepts?(value, scope); end
|
265
|
+
|
266
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:62
|
267
|
+
def convert(scope, value); end
|
268
|
+
|
269
|
+
# Returns the value of attribute converter.
|
270
|
+
#
|
271
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:7
|
272
|
+
def converter; end
|
273
|
+
|
274
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:74
|
275
|
+
def default(scope); end
|
276
|
+
|
277
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:98
|
278
|
+
def define(klass); end
|
279
|
+
|
280
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:136
|
281
|
+
def get(scope); end
|
282
|
+
|
283
|
+
# Returns the value of attribute instance_variable_name.
|
284
|
+
#
|
285
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:10
|
286
|
+
def instance_variable_name; end
|
287
|
+
|
288
|
+
# @return [Boolean]
|
289
|
+
#
|
290
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:49
|
291
|
+
def missing?(scope); end
|
292
|
+
|
293
|
+
# Returns the value of attribute name.
|
294
|
+
#
|
295
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:6
|
296
|
+
def name; end
|
297
|
+
|
298
|
+
# @return [Boolean]
|
299
|
+
#
|
300
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:45
|
301
|
+
def optional?(scope); end
|
302
|
+
|
303
|
+
# @raise [MissingValueError]
|
304
|
+
#
|
305
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:89
|
306
|
+
def prepare(scope, value); end
|
307
|
+
|
308
|
+
# @return [Boolean]
|
309
|
+
#
|
310
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:53
|
311
|
+
def present?(scope); end
|
312
|
+
|
313
|
+
# Returns the value of attribute reader.
|
314
|
+
#
|
315
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:9
|
316
|
+
def reader; end
|
317
|
+
|
318
|
+
# @return [Boolean]
|
319
|
+
#
|
320
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:41
|
321
|
+
def required?(scope); end
|
322
|
+
|
323
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:122
|
324
|
+
def set(scope, value); end
|
325
|
+
|
326
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:126
|
327
|
+
def set_default(scope); end
|
328
|
+
|
329
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:141
|
330
|
+
def to_h; end
|
331
|
+
|
332
|
+
# Returns the value of attribute writable.
|
333
|
+
#
|
334
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:11
|
335
|
+
def writable; end
|
336
|
+
|
337
|
+
# @return [Boolean]
|
338
|
+
#
|
339
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:57
|
340
|
+
def writable?; end
|
341
|
+
|
342
|
+
private
|
343
|
+
|
344
|
+
# @return [Boolean]
|
345
|
+
#
|
346
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:155
|
347
|
+
def null_object?(object); end
|
348
|
+
|
349
|
+
class << self
|
350
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:13
|
351
|
+
def define(scope, name, **options); end
|
352
|
+
end
|
353
|
+
end
|
354
|
+
|
355
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:4
|
356
|
+
SmartProperties::Property::ALLOWED_DEFAULT_CLASSES = T.let(T.unsafe(nil), Array)
|
357
|
+
|
358
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property.rb:3
|
359
|
+
SmartProperties::Property::MODULE_REFERENCE = T.let(T.unsafe(nil), Symbol)
|
360
|
+
|
361
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:2
|
362
|
+
class SmartProperties::PropertyCollection
|
363
|
+
include ::Enumerable
|
364
|
+
|
365
|
+
# @return [PropertyCollection] a new instance of PropertyCollection
|
366
|
+
#
|
367
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:23
|
368
|
+
def initialize; end
|
369
|
+
|
370
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:37
|
371
|
+
def [](name); end
|
372
|
+
|
373
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:29
|
374
|
+
def []=(name, value); end
|
375
|
+
|
376
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:53
|
377
|
+
def each(&block); end
|
378
|
+
|
379
|
+
# @return [Boolean]
|
380
|
+
#
|
381
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:41
|
382
|
+
def key?(name); end
|
383
|
+
|
384
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:45
|
385
|
+
def keys; end
|
386
|
+
|
387
|
+
# Returns the value of attribute parent.
|
388
|
+
#
|
389
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:5
|
390
|
+
def parent; end
|
391
|
+
|
392
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:62
|
393
|
+
def register(child); end
|
394
|
+
|
395
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:58
|
396
|
+
def to_hash; end
|
397
|
+
|
398
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:49
|
399
|
+
def values; end
|
400
|
+
|
401
|
+
protected
|
402
|
+
|
403
|
+
# Returns the value of attribute children.
|
404
|
+
#
|
405
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:70
|
406
|
+
def children; end
|
407
|
+
|
408
|
+
# Sets the attribute children
|
409
|
+
#
|
410
|
+
# @param value the value to set the attribute children to.
|
411
|
+
#
|
412
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:70
|
413
|
+
def children=(_arg0); end
|
414
|
+
|
415
|
+
# Returns the value of attribute collection.
|
416
|
+
#
|
417
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:71
|
418
|
+
def collection; end
|
419
|
+
|
420
|
+
# Sets the attribute collection
|
421
|
+
#
|
422
|
+
# @param value the value to set the attribute collection to.
|
423
|
+
#
|
424
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:71
|
425
|
+
def collection=(_arg0); end
|
426
|
+
|
427
|
+
# Returns the value of attribute collection_with_parent_collection.
|
428
|
+
#
|
429
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:72
|
430
|
+
def collection_with_parent_collection; end
|
431
|
+
|
432
|
+
# Sets the attribute collection_with_parent_collection
|
433
|
+
#
|
434
|
+
# @param value the value to set the attribute collection_with_parent_collection to.
|
435
|
+
#
|
436
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:72
|
437
|
+
def collection_with_parent_collection=(_arg0); end
|
438
|
+
|
439
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:74
|
440
|
+
def notify_children; end
|
441
|
+
|
442
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:78
|
443
|
+
def refresh(parent_collection); end
|
444
|
+
|
445
|
+
class << self
|
446
|
+
# source://smart_properties-1.17.0/lib/smart_properties/property_collection.rb:7
|
447
|
+
def for(scope); end
|
448
|
+
end
|
449
|
+
end
|
450
|
+
|
451
|
+
# source://smart_properties-1.17.0/lib/smart_properties/version.rb:2
|
452
|
+
SmartProperties::VERSION = T.let(T.unsafe(nil), String)
|
453
|
+
|
454
|
+
# source://smart_properties-1.17.0/lib/smart_properties/validations.rb:4
|
455
|
+
module SmartProperties::Validations; end
|
456
|
+
|
457
|
+
# source://smart_properties-1.17.0/lib/smart_properties/validations/ancestor.rb:4
|
458
|
+
class SmartProperties::Validations::Ancestor
|
459
|
+
include ::SmartProperties
|
460
|
+
extend ::SmartProperties::ClassMethods
|
461
|
+
|
462
|
+
# source://smart_properties-1.17.0/lib/smart_properties/validations/ancestor.rb:13
|
463
|
+
def to_proc; end
|
464
|
+
|
465
|
+
# source://smart_properties-1.17.0/lib/smart_properties/validations/ancestor.rb:18
|
466
|
+
def to_s; end
|
467
|
+
|
468
|
+
# source://smart_properties-1.17.0/lib/smart_properties/validations/ancestor.rb:9
|
469
|
+
def validate(klass); end
|
470
|
+
|
471
|
+
class << self
|
472
|
+
def must_be(*_arg0); end
|
473
|
+
end
|
474
|
+
end
|