mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Correct VariableNames doc example
This commit is contained in:
parent
32ac199162
commit
4e19571fb3
1 changed files with 3 additions and 11 deletions
|
@ -4,17 +4,9 @@ module Ameba::Rule::Style
|
|||
# For example, these variable names are considered valid:
|
||||
#
|
||||
# ```
|
||||
# class Greeting
|
||||
# @@default_greeting = "Hello world"
|
||||
#
|
||||
# def initialize(@custom_greeting = nil)
|
||||
# end
|
||||
#
|
||||
# def print_greeting
|
||||
# greeting = @custom_greeting || @@default_greeting
|
||||
# puts greeting
|
||||
# end
|
||||
# end
|
||||
# var_name = 1
|
||||
# name = 2
|
||||
# _another_good_name = 3
|
||||
# ```
|
||||
#
|
||||
# And these are invalid method names:
|
||||
|
|
Loading…
Reference in a new issue