On Mon, Jan 16, 2012 at 2:20 AM, Adam Prescott <adam / aprescott.com> wrote:
> The latter. Because spending a little extra more time to make things more
> readable will make other people (experienced and inexperienced alike),
> along with your future self, have a more pleasant time following what's
> happening. Optimise happiness, not keystrokes.

+1

Plus, I'd rid of variable "message" because it is used in one place
only and removing does not loose any documentation relevant
information.  Maybe I'd also remove "backtrace" because that is used
in one place only also.

Doesn't look too bad, does it?

    def self.assert(*arguments, &block)
      options = (Hash === arguments.last ? arguments.pop : {})

      assay = new(options[:message], *arguments, &block)
      assay.set_backtrace(options[:backtrace] || caller)
      assay.assert
    end

A variable always introduces one step in reading indirection which is
only warranted if the value is used in several places or not using the
variable clutters expressions too much.

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/