Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save RobertDober/184393 to your computer and use it in GitHub Desktop.
Save RobertDober/184393 to your computer and use it in GitHub Desktop.
class << Factory
alias_method :__build__, :build
def build *args, &blk
__log__( *args )
__build__( *args, &blk )
end
private
def __log__ *args
@__logfile__ ||= File::new( "xxx", "w" )
@__logfile__.puts( caller[2].to_s + args.inspect )
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment