タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

Rubyとcodingstyleに関するmaxyのブックマーク (2)

  • Ruby on Rails Code Quality Checklist - Articles - Matthew Moore

    Practices your development team needs to adhere by Discussion & Votes at: Digg, Reddit, YC Hacker News, DZone, Delicious In my experience, Ruby and Ruby on Rails has been one of the most difficult language/framework combinations to truly master.  For someone who grew up on C, C++ & Java in the majority of their training, Ruby has hugely different (and better!) ways of OO design, and the Rails fram

  • Rubyコーディング規約

    はじめに 文書は、Rubyによりコーディングを行う際の規約について述べる。 実際のプロジェクトに適用する際には、このコーディング規約をカスタ マイズして用いることを推奨する。 ソースコードの整形 インデント プログラムを読みやすくするため、インデントを適宜行う。インデント 幅は2とする。また、インデントにはスペースのみを使用し、タブは使用 しない。(環境によりタブ幅が異なるため。) 例: if x > 0 if y > 0 puts "x > 0 && y > 0" end end 一行の桁数 一行の桁数は最大80桁までとする。 空行 複数のクラスの区切には空行を挿入する。 例: class Foo ... end class Bar ... end 誤った例: class Foo ... end class Bar ... end また、クラス内の各構成要素の区切にも空行を挿入する。

  • 1