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

Version Path
utils-0.0.21 bin/classify
utils-0.0.20 bin/classify
utils-0.0.19 bin/classify
utils-0.0.18 bin/classify
utils-0.0.17 bin/classify
utils-0.0.16 bin/classify
utils-0.0.15 bin/classify
utils-0.0.14 bin/classify
utils-0.0.13 bin/classify
utils-0.0.12 bin/classify
utils-0.0.10 bin/classify
utils-0.0.8 bin/classify
utils-0.0.7 bin/classify
utils-0.0.6 bin/classify
utils-0.0.5 bin/classify