From: "Peña, Botp" Date: 2008-03-03T13:52:11+09:00 Subject: Re: Ara's main gem: validation with error message From: ara.t.howard [mailto:ara.t.howard@gmail.com] # message = 'YOU CAN USE A CLOSURE' # validate do |user| # if user == 'foo' # message = 'message one' # return false would it be possible to merge those last two lines? maybe something like raise_error 'message one' which then flags an error and sends the 'message one' to error(). see below question # end # if user == 'bar' # message = 'message two' # return false # end # # true # end # # error{ STDERR.puts message } standard format of error is error{|msg| ...}, how do i set an error message so that error can capture it and i can just generically call error{|msg| p msg}. no var declaration/tracking needed ie kind regards -botp