Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions style/ruby/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Ruby
* Prefer `protected` over `private` for non-public `attr_reader`s, `attr_writer`s,
and `attr_accessor`s.
* Order class methods above instance methods.
* Prefer method invocation over instance variables.

[trailing comma example]: /style/ruby/sample.rb#L49
[required kwargs]: /style/ruby/sample.rb#L16
Expand Down
4 changes: 2 additions & 2 deletions style/ruby/sample.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def method_without_arguments
end

def method_that_uses_factory
user = @user_factory.new
user = user_factory.new
user.ensure_authenticated!
end

Expand All @@ -87,7 +87,7 @@ def self.class_method

protected

attr_reader :foo
attr_reader :foo, :user_factory
attr_accessor :bar
attr_writer :baz

Expand Down