Sha256: 568727a9bf35dc184fe226f1f84db531977711bbb585edb918a9da144d8f6276
Contents?: true
Size: 854 Bytes
Versions: 1
Compression:
Stored size: 854 Bytes
Contents
if !defined?(RuneBlog::Path) # if ! (Object.constants.include?(:RuneBlog) && RuneBlog.constants.include?(:Path)) class RuneBlog VERSION = "0.3.05" path = Gem.find_files("runeblog").grep(/runeblog-/).first Path = File.dirname(path) end # skeleton class RuneBlog module Helpers end class Default end class View end class Publishing end class Post end end # Refactor, move stuff elsewhere? def make_exception(sym, str) log!(enter: __method__, args: [sym, str], level: 3) 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) log!(enter: __method__, args: [num], level: 3) "#{'%04d' % num.to_i}" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
runeblog-0.3.05 | lib/runeblog_version.rb |