Rubies for the holidays
Rubies for the holidays
Over the last two weeks I have been taking vacation and diving head first into my first major ruby language project.
Having never programed ruby before my gut reaction to the language is one word: awesome.
The only drawback to it is my own misunderstanding of the limits to the ‘magic’ of ruby. I definitely fell prey to some PHP-esque syntax that is no longer necessary.
My favorite so far: whatever is at the end of the action is returned.
# never mind that this is built it
def even (number)
number % 2
end
@attr = even(2) {|r| r ? r : nil}
Biggest suprise: nil
is an object and nil.id
is 4
At any rate, programming a rake task in a ror application (Redmine) has been a fun and interesting challenge. I look forward to using ruby more in my problem solving and application building experiences.
Author’s Note
Initial md
Generated using https://github.com/jsr6720/wordpress-html-scraper-to-md
Original Wordpress categories: [‘Personal Musings’]
Original Wordpress tags: “Personal Musings”, “ror”, “ruby”
Original Wordpress comments: None
Significant revisions
tags: 2011, wordpress, txcowboycoder, musings, ruby-on-rails, ruby
- May 6th, 2024 Converted to jekyll markdown format and copied to personal site
- Jan 6th, 2011 Originally published on txcowboycoder wordpress site