lib/avsh/vagrantfile_environment.rb
Do not place comments on the same line as the def
keyword. Open
Open
def self.method_missing(*) end # ignore everything else
- Read upRead up
- Exclude checks
This cop checks for comments put on the same line as some keywords.
These keywords are: begin
, class
, def
, end
, module
.
Note that some comments (such as :nodoc:
and rubocop:disable
) are
allowed.
Example:
# bad
if condition
statement
end # end if
# bad
class X # comment
statement
end
# bad
def x; end # comment
# good
if condition
statement
end
# good
class X # :nodoc:
y
end
When using method_missing
, define respond_to_missing?
and fall back on super
. (https://github.com/bbatsov/ruby-style-guide#no-method-missing) Open
Open
def self.method_missing(*) end # ignore everything else
- Read upRead up
- Exclude checks
This cop checks for the presence of method_missing
without also
defining respond_to_missing?
and falling back on super
.
Example:
#bad
def method_missing(name, *args)
# ...
end
#good
def respond_to_missing?(name, include_private)
# ...
end
def method_missing(name, *args)
# ...
super
end
When using method_missing
, define respond_to_missing?
and fall back on super
. (https://github.com/bbatsov/ruby-style-guide#no-method-missing) Open
Open
def method_missing(*)
DummyConfig
end
- Read upRead up
- Exclude checks
This cop checks for the presence of method_missing
without also
defining respond_to_missing?
and falling back on super
.
Example:
#bad
def method_missing(name, *args)
# ...
end
#good
def respond_to_missing?(name, include_private)
# ...
end
def method_missing(name, *args)
# ...
super
end
When using method_missing
, define respond_to_missing?
and fall back on super
. (https://github.com/bbatsov/ruby-style-guide#no-method-missing) Open
Open
def self.method_missing(*)
DummyConfig
end
- Read upRead up
- Exclude checks
This cop checks for the presence of method_missing
without also
defining respond_to_missing?
and falling back on super
.
Example:
#bad
def method_missing(name, *args)
# ...
end
#good
def respond_to_missing?(name, include_private)
# ...
end
def method_missing(name, *args)
# ...
super
end
When using method_missing
, define respond_to_missing?
and fall back on super
. (https://github.com/bbatsov/ruby-style-guide#no-method-missing) Open
Open
def self.method_missing(*)
DummyConfig
end
- Read upRead up
- Exclude checks
This cop checks for the presence of method_missing
without also
defining respond_to_missing?
and falling back on super
.
Example:
#bad
def method_missing(name, *args)
# ...
end
#good
def respond_to_missing?(name, include_private)
# ...
end
def method_missing(name, *args)
# ...
super
end