Should I prefer instance methods over class methods in Ruby?: I'm working on a rails application, and I've been

I'm working on a rails application, and I've been pulling functionality out of my rails code and into pure ruby classes in lib/. I've found myself often writing classes like this: class MailchimpIntegration def subscribe_email(email, fname, lname) Gibbon.list_subscribe(:id => NEWSLETTER_LIST_ID, :email_address => email, :merge_vars => {'fname' => fname, 'lname' => lname }, :email_type => "html", :double_optin => false, :send_welcome => false) end def unsubscribe_email(email) Gibbon.list_unsubscribe(:id => NEWSLETTER_LIST_ID, :email_address => email) end def change_details(old_email, email, fname, lname) Gibbon.list_update_member(:id => NEWSLETTER_LIST_ID, :email_address => old_email, :merge_vars => {'email' => email, 'fname' => fname, 'lname' => lname }) end def get_email_info(email) Gibbon.list_member_info(:id => NEWSLETTER_LIST_ID, :email_address => [email])["data"].firs...

Full article: http://programmers.stackexchange.com/questions/162349/sho...

Tweets

Learn: Ruby on Rails w @CabForward Intro to Advanced class in #Austin is open for reg: < Don't miss out

Learn: Ruby on Rails w @CabForward Intro to Adv...

cospace.co 27 Aug '12, 4pm

classes prepare students for the Advanced lessons. We start by developing a basic understanding of the Ruby language, itse...

Reminder: We're throwing our first Ruby / Rails...

columbusrb.com 04 Sep '12, 1pm

Join us as we explore the Ruby and Rails ecosystems. All levels of experience are welcome and encouraged to join!

Energy Modeling and Integrated Design are Keys ...

greenbuildingadvisor.com 29 Aug '12, 6pm

The design team started by modeling potential building assemblies with a helpful software package called REM:Design, but t...

of UK investment bankers would prefer to work i...

ft.com 26 Aug '12, 1pm

FTfm FTfm Regulation ETFs Investment Strategy Pensions People Opinion Video Markets Data Markets Data Bonds & Rates Commod...

Ruby on Rails - passing a returned value of a m...

stackoverflow.com 26 Aug '12, 7pm

The problem is that you're trying to use an instance method picture_sizes_as_strings in a declaration (has_attached_image ...

Program made done in Java or Ruby if you prefer...

freelancer.com 29 Aug '12, 8am

java program open display content text file , open txt file text area java program , java program parse data text file , j...

New SIPRI essay by Hugh Griffiths on practical ...

sipri.org 24 Aug '12, 9am

Another problem confronting policy makers today is smuggling via shipping container. As documented in the SIPRI report Mar...

U.K. Investment Bankers Prefer to Work in Singapore

U.K. Investment Bankers Prefer to Work in Singa...

bloomberg.com 26 Aug '12, 11pm

have been quick to capitalize on setbacks in London and New York, courting investment banks and reacting to demand from ex...

Why Aspiring Programmers Should Learn Ruby on Rails

Why Aspiring Programmers Should Learn Ruby on R...

marketstreettalent.com 23 Aug '12, 12pm

Earlier this week, I wrote about why existing programmers should learn Ruby on Rails, however this wonderful technology is...