Sha256: 01e8ecefff37bc175cea378eb722edb5ec3ee1785f6264e4e665e785076c76d6

Contents?: true

Size: 392 Bytes

Versions: 12

Compression:

Stored size: 392 Bytes

Contents

module Ninjs
  module Helpers
    
    def get_filename(module_path)
      module_path = module_path.split(/[\\\/]/).last
      split = module_path.split(/[\.\-\s]/)
      module_filename = String.new
      split.each do |piece|
        module_filename << piece unless piece.match(/^module$|^js$/i)
      end
      module_filename
    end
    
    module_function :get_filename
    
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ninjs-0.16.8 lib/ninjs/helpers.rb
ninjs-0.16.7 lib/ninjs/helpers.rb
ninjs-0.16.6 lib/ninjs/helpers.rb
ninjs-0.16.5 lib/ninjs/helpers.rb
ninjs-0.16.4 lib/ninjs/helpers.rb
ninjs-0.16.3 lib/ninjs/helpers.rb
ninjs-0.16.2 lib/ninjs/helpers.rb
ninjs-0.16.1 lib/ninjs/helpers.rb
ninjs-0.16.0 lib/ninjs/helpers.rb
ninjs-0.14.1 lib/ninjs/helpers.rb
ninjs-0.14.0 lib/ninjs/helpers.rb
ninjs-0.13.8 lib/ninjs/helpers.rb