Sha256: 21f663fc69abd53d0d9fb1aaaccbaabebd8e5220ccb2e27aa96d9b44141587fd
Contents?: true
Size: 719 Bytes
Versions: 1
Compression:
Stored size: 719 Bytes
Contents
module Jot module Ruby module Utils module Snippets def not_implemented(*method_names) not_implemented_module = Module.new do method_names.each do |method_name| define_method method_name do |*_args| raise NotImplementedError, method_name end end end include not_implemented_module end def gem_root root = File.dirname(File.expand_path(caller_locations(1, 1)[0].path)) while root != '/' return root unless Dir[File.join(root, '*.gemspec')].empty? root = File.dirname(root) end nil end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jot-ruby-0.1.4 | lib/jot/ruby/utils/snippets.rb |