Sha256: 841553abcc1a25ceb96ab14c03e5b036758c5fb68f994890ba86f6d0b37478e0

Contents?: true

Size: 584 Bytes

Versions: 5

Compression:

Stored size: 584 Bytes

Contents

require 'uri'

module Aemninja
  module Helpers

    def self.create_directory(name)
      puts 'create ' + name
      FileUtils.mkdir_p name
    end

    def self.create_file(name)
      puts 'create ' + name
      FileUtils.touch name
    end

    def self.remove_path_from package
      URI(package).path.split('/').last
    end

    def self.remove_version_from package
      package.split(/[0-9]/)[0]
    end

    def self.remove_path_and_version_from package
      package_without_path = remove_path_from package
      remove_version_from package_without_path
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
aemninja-0.0.6 lib/aemninja/helpers.rb
aemninja-0.0.5 lib/aemninja/helpers.rb
aemninja-0.0.4 lib/aemninja/helpers.rb
aemninja-0.0.3 lib/aemninja/helpers.rb
aemninja-0.0.2 lib/aemninja/helpers.rb