Sha256: 17b2b595f51de9d4c9bcad41758239c14fbdbf4fe1ffbf51018f691958502044

Contents?: true

Size: 703 Bytes

Versions: 19

Compression:

Stored size: 703 Bytes

Contents

module GroupDocs
  module Api
    module Helpers
      module Path

        #
        # Verifies path starts with root.
        #
        # @raise [ArgumentError] If path does not start with /
        # @api private
        #
        def self.verify_starts_with_root(path)
          path.chars.first == '/' or raise ArgumentError, "Path should start with /: #{path.inspect}"
        end

        #
        # Appends file name to path if it's not present.
        #
        # @api private
        #
        def self.append_file_name(path, name)
          path << "/#{Object::File.basename(name)}" unless /\.(\w){3,4}$/ === path
        end

      end # Path
    end # Helpers
  end # Api
end # GroupDocs

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
groupdocs-0.3.11 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.3.10 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.3.9 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.3.8 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.3.7 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.3.6 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.3.5 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.3.0 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.2.11 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.2.10 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.2.9 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.2.8 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.2.7 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.2.6 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.2.5 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.2.4 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.2.3 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.2.2 lib/groupdocs/api/helpers/path_helper.rb
groupdocs-0.2.1 lib/groupdocs/api/helpers/path_helper.rb