Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 447 Bytes

Style-BisectedAttrAccessor.md

File metadata and controls

26 lines (18 loc) · 447 Bytes

Pattern: Bisected attr_accessor

Issue: -

Description

Checks for places where attr_reader and attr_writer for the same method can be combined into single attr_accessor.

Examples

# bad
class Foo
  attr_reader :bar
  attr_writer :bar
end

# good
class Foo
  attr_accessor :bar
end

Further Reading