The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
bool_attr_accessor for convenient question marks

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Duncan Beevers

Posts: 68
Nickname: dbeevers
Registered: May, 2008

Duncan Beevers is a hack and jester building shiny baubles from bytes and tears.
bool_attr_accessor for convenient question marks Posted: May 10, 2008 1:20 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Duncan Beevers.
Original Post: bool_attr_accessor for convenient question marks
Feed Title: dweebd
Feed URL: http://www.dweebd.com/feed/
Feed Description: Ruby ejecta from the leading edge
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Duncan Beevers
Latest Posts From dweebd

Advertisement
Update → Rick Olson pointed out the overhead in accessing instance_values, and suggested instead using instance_variable_get. Done! Ruby’s attr_accessor is incredibly handy for wiring up your class’s banal getters and setters. If you’re wiring up some simple booleans this way though, wouldn’t you like to get the beauty of Ruby’s method punctuation? I mean come on, we’re [...]

Read: bool_attr_accessor for convenient question marks

Topic: 70,000 Lines of Code in 4 Routines. Awesome! Previous Topic   Next Topic Topic: Searching Beast and WordPress from a Rails app

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use