Sha256: f0e68ccc9cb23d8bb4cb1a8220c56bf7bea4e665ac37c5cf05217f3cb8755323
Contents?: true
Size: 853 Bytes
Versions: 1
Compression:
Stored size: 853 Bytes
Contents
if !defined?(RuneBlog::Path) # if ! (Object.constants.include?(:RuneBlog) && RuneBlog.constants.include?(:Path)) class RuneBlog VERSION = "0.3.07" 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.07 | lib/runeblog_version.rb |