On Mon, Jan 26, 2009 at 7:23 AM, James Byrne <li...@ruby-forum.com> wrote:

>  return true if  (effective_from <= time_now and
>                      (not superseded_after or superseded_after >=  time_now
> ))
>      return false
>

This has nothing to do with your question - just a style suggestion:

 effective_from <= time_now and (superseded_after.nil? or superseded_after
>=  time_now)

No need to use 'return'. And you don't want to check if superseded_after is
false - just nil (if it's false, there's a bug that would be hidden by 'not
superseded').

Carry on. :)

///ark
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to