Created
March 19, 2012 18:05
-
-
Save cokron/2122027 to your computer and use it in GitHub Desktop.
Ruby style guides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This class holds the logic for X | |
class Foo | |
extend SomeModule | |
include SomeModule | |
# associations | |
has_many :bars | |
# scopes | |
named_scope :special_foos | |
# validations | |
validates_presence_of :name | |
# callbacks | |
reader/writer | |
delegates | |
class <<self | |
def some_class_method | |
# do stuff | |
end | |
end | |
def initialize | |
end | |
def some_instance_method | |
# do stuff | |
end | |
private | |
def some_private_method | |
# do stuff | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment