Skip to content

Commit a924fca

Browse files
committed
Add section for empty lines around module inclusion
1 parent dd6d129 commit a924fca

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Diff for: README.adoc

+24
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,30 @@ some_method
564564
some_method
565565
----
566566

567+
=== Empty Lines around Module Inclusion [[empty-lines-around-module-inclusion]]
568+
569+
Use empty lines around module inclusion methods (`extend`, `include` and `prepend`).
570+
571+
[source,ruby]
572+
----
573+
# bad
574+
class Foo
575+
extend SomeModule
576+
include AnotherModule
577+
prepend YetAnotherModule
578+
def foo; end
579+
end
580+
581+
# good
582+
class Foo
583+
extend SomeModule
584+
include AnotherModule
585+
prepend YetAnotherModule
586+
587+
def foo; end
588+
end
589+
----
590+
567591
=== Empty Lines around Attribute Accessor [[empty-lines-around-attribute-accessor]]
568592

569593
Use empty lines around attribute accessor.

0 commit comments

Comments
 (0)