Skip to content

Conversation

@ellesuzuki
Copy link

No description provided.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally here, you wouldn't bother assigning the hash to "options" just to send in to Auto. You could write it as:

auto = Auto.new({:color => 'black', :make => 'Volkswagen', :model => 'Golf', :year => 2012})

And ruby also allows:

auto = Auto.new(:color => 'black', :make => 'Volkswagen', :model => 'Golf', :year => 2012)

Those will all get munged into a single hash variable. Finally, I really like this syntax better (the 1.9 hash syntax), but this is an aesthetic and team choice:

auto = Auto.new( color: 'black', make: 'Volkswagen', model: 'Golf', year: 2012)

@jwo
Copy link
Member

jwo commented Jan 24, 2013

Looks great! I added some stylistic comments, but the pull looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants