Sha256: 5f45b02d8d4de4d08c297dd895503a92ec51cd3d1ec6fda23fdbb34c4a77d1ad
Contents?: true
Size: 407 Bytes
Versions: 15
Compression:
Stored size: 407 Bytes
Contents
#!/usr/bin/env ruby require 'spruz/go' include Spruz::GO require 'spruz/xt/string' opts = go 'bd' string = ARGV.shift or fail "need a class/filepath/filename" if opts['d'] string = string.sub(/.*::/, '') if opts['b'] print string.underscore + '.rb' else string = File.basename(string) if opts['b'] string = string.gsub(/#{Regexp.quote(File.extname(string))}\Z/, '') print string.camelize end
Version data entries
15 entries across 15 versions & 1 rubygems