Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Justin Ossevoort's latest activity

Wednesday, October 21 2009
9 Store defaults after first request was updated in doodle
  • Justin Ossevoort
    Justin Ossevoort commented at 1:45 PM

    My examples were pretty screwed up, here is a cleaned up version with example:

        require 'doodle'
    
        $counter = 0
    
        class Foo < Doodle
           has init_a...
10 Support for 'predicate' and 'clearer' methods was updated in doodle
  • Justin Ossevoort
    Justin Ossevoort commented at 1:34 PM

    oh and the first block should of course have read:

        f.has?(:simple_attr)       # => true
        f.valued?(:simple_attr)    # => false
        f.assigned?(:simple_a...
  • Justin Ossevoort
    Justin Ossevoort commented at 1:29 PM

    I've been mulling over this for some days, but for these cover the really essential introspection needs. The only possibly relevant one that's possibly missing ...

Monday, October 12 2009
10 Support for 'predicate' and 'clearer' methods was updated in doodle
  • Justin Ossevoort
    • Tag set to feature
    by Justin Ossevoort at 8:49 AM
  • Justin Ossevoort
    Justin Ossevoort commented at 8:00 AM

    The clearer is great, that really complements the <.assigned?>

    I agree that the ActiveRecord way is ugly for it really conflicts with the way you'd expect boole...

9 Store defaults after first request was updated in doodle
  • Justin Ossevoort
    • Tag set to feature
    by Justin Ossevoort at 8:43 AM

    I see I didn't really state my intentions clearly. What I was looking for was something along the lines of lazy initialization. And neither nor really do that.

    ...

11 Support for 'readonly' attributes was updated in doodle
  • Justin Ossevoort
    Justin Ossevoort commented at 8:03 AM

    Ah I was wondering how to do that, I'm more used to traditional issue tracking systems which have a clear classification, but I can see how tags help to simulat...

Tuesday, July 07 2009
9 Store defaults after first request was updated in doodle
  • Justin Ossevoort
    Justin Ossevoort commented at 1:14 PM

    Oh, and here is the way to currently work around this:

    class Foo < Doodle
      @@serial = 0
      has :uid do
         default{ @uid = @@serial += 1 }
      end
    end
    
    x = Foo....
Wednesday, June 24 2009
11 Support for 'readonly' attributes was created in doodle
  • Justin Ossevoort
    Justin Ossevoort created the ticket at 1:31 PM

    It would be nice if one could easily prevent the generation of the setter method. Perhaps something along the lines of Moose's 'is' property:

    has :uuid, :is =>...
Tuesday, June 23 2009
10 Support for 'predicate' and 'clearer' methods was created in doodle
  • Justin Ossevoort
    Justin Ossevoort created the ticket at 11:29 AM

    I used Moose under perl and there they used the concept of 'predicate' and 'clearer' methods (normally something like: has_X and clear_X). A predicate under rub...