Sha256: de542f1ddb402ac8e4cace8a2a6c029298a28a2f41cbb5dd3a56a37666cf63fd

Contents?: true

Size: 419 Bytes

Versions: 1

Compression:

Stored size: 419 Bytes

Contents

# skeleton

class RuneBlog
  module Helpers
  end

  class Default
  end

  class View
  end

  class Deployment
  end

  class Post
  end
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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
runeblog-0.0.93 lib/skeleton.rb