1
- # Prelude
1
+ # The Ruby Style Guide
2
2
3
3
> Role models are important. <br >
4
4
> -- Officer Alex J. Murphy / RoboCop
5
5
6
- One thing has always bothered me as a Ruby developer&mdash ; Python developers
7
- have a great programming style reference ([ PEP-8] [ ] ) and we never got an
8
- official guide, documenting Ruby coding style and best practices. And I do
9
- believe that style matters. I also believe that a great hacker community, such
10
- as Ruby has, should be quite capable of producing this coveted document.
11
-
12
- This guide started its life as our internal company Ruby coding guidelines
13
- (written by yours truly). At some point I decided that the work I was doing
14
- might be interesting to members of the Ruby community in general and that the
15
- world had little need for another internal company guideline. But the world
16
- could certainly benefit from a community-driven and community-sanctioned set of
17
- practices, idioms and style prescriptions for Ruby programming.
18
-
19
- Since the inception of the guide I've received a lot of feedback from members of
20
- the exceptional Ruby community around the world. Thanks for all the suggestions
21
- and the support! Together we can make a resource beneficial to each and every
22
- Ruby developer out there.
23
-
24
- By the way, if you're into Rails you might want to check out the complementary
25
- [ Ruby on Rails Style Guide] [ rails-style-guide ] .
26
-
27
- # The Ruby Style Guide
6
+ ## Overview
28
7
29
8
This Ruby style guide recommends best practices so that real-world Ruby
30
9
programmers can write code that can be maintained by other real-world Ruby
@@ -59,6 +38,9 @@ You can generate a PDF or an HTML copy of this guide using
59
38
[ RuboCop] [ ] is a static code analyzer (linter) and formatter, based on this
60
39
style guide.
61
40
41
+ By the way, if you're into Rails you might want to check out the complementary
42
+ [ Ruby on Rails Style Guide] [ rails-style-guide ] .
43
+
62
44
Translations of the guide are available in the following languages:
63
45
64
46
* [ Chinese Simplified] ( https://github.com/JuanitoFatas/ruby-style-guide/blob/master/README-zhCN.md )
@@ -4608,7 +4590,27 @@ Guide and plugins for most popular Ruby editors and IDEs.
4608
4590
[partially based](http://confluence.jetbrains.com/display/RUBYDEV/RubyMine+Inspections)
4609
4591
on this guide.
4610
4592
4611
- # Contributing
4593
+ ## History
4594
+
4595
+ One thing has always bothered me as a Ruby developer—Python developers
4596
+ have a great programming style reference ([PEP-8][]) and we never got an
4597
+ official guide, documenting Ruby coding style and best practices. And I do
4598
+ believe that style matters. I also believe that a great hacker community, such
4599
+ as Ruby has, should be quite capable of producing this coveted document.
4600
+
4601
+ This guide started its life as our internal company Ruby coding guidelines
4602
+ (written by yours truly). At some point I decided that the work I was doing
4603
+ might be interesting to members of the Ruby community in general and that the
4604
+ world had little need for another internal company guideline. But the world
4605
+ could certainly benefit from a community-driven and community-sanctioned set of
4606
+ practices, idioms and style prescriptions for Ruby programming.
4607
+
4608
+ Since the inception of the guide I' ve received a lot of feedback from members of
4609
+ the exceptional Ruby community around the world. Thanks for all the suggestions
4610
+ and the support! Together we can make a resource beneficial to each and every
4611
+ Ruby developer out there.
4612
+
4613
+ # # Contributing
4612
4614
4613
4615
The guide is still a work in progress& mdash;some rules are lacking examples,
4614
4616
some rules don' t have examples that illustrate them clearly enough. Improving
@@ -4628,16 +4630,14 @@ advance for your help!
4628
4630
You can also support the project (and RuboCop ) with financial
4629
4631
contributions via [Patreon ](https: // www.patreon.com/ bbatsov).
4630
4632
4631
- ## How to Contribute?
4632
-
4633
4633
It ' s easy, just follow the [contribution guidelines](https://github.com/rubocop-hq/ruby-style-guide/blob/master/CONTRIBUTING.md).
4634
4634
4635
- # License
4635
+ ## License
4636
4636
4637
4637

4638
4638
This work is licensed under a [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/deed.en_US)
4639
4639
4640
- # Spread the Word
4640
+ ## Spread the Word
4641
4641
4642
4642
A community-driven style guide is of little use to a community that
4643
4643
doesn' t know about its existence. Tweet about the guide, share it with
0 commit comments