Sha256: 827df2ecdcce00f51e2e5ea252dd349637fc1ca2093fc524b214d94d0ef61615
Contents?: true
Size: 489 Bytes
Versions: 9
Compression:
Stored size: 489 Bytes
Contents
# skeleton class RuneBlog module Helpers end class Default end class View end class Publishing end class Post end end def curses? true end def make_exception(sym, str) return if Object.constants.include?(sym) Object.const_set(sym, StandardError.dup) define_method(sym) do |*args| msg = str args.each.with_index {|arg, i| msg.sub!("$#{i+1}", arg) } Object.class_eval(sym.to_s).new(msg) end end def prefix(num) "#{'%04d' % num.to_i}" end
Version data entries
9 entries across 9 versions & 1 rubygems