Sha256: f693d5d06b2ea61321e4ed32c2f6cdbd93e4fb9a01556511cf888eb4a2d41213

Contents?: true

Size: 253 Bytes

Versions: 2

Compression:

Stored size: 253 Bytes

Contents

# frozen_string_literal: true

module Deadpull
  module Values
    class RootRelativePath < Base
      extend Dry::Initializer

      param :root
      param :path

      def concretize
        path.sub(%r{\A#{root}?\/}, '')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
deadpull-0.1.1 lib/deadpull/values/root_relative_path.rb
deadpull-0.1.0 lib/deadpull/values/root_relative_path.rb