Sha256: 44bdf2d85407d16fa5ce768c19e38943316df8b52449d7a2ba1ab79e8ef72232

Contents?: true

Size: 244 Bytes

Versions: 1

Compression:

Stored size: 244 Bytes

Contents

module Stowaway
  class TargetContext
    def initialize(root)
      @root = root
    end

    attr_reader :root

    def path_relative_to_root(file_p)
      root = @root.split("/").last
      file_p.sub(/^.+\/(#{root})/, "")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stowaway-0.2.5 lib/stowaway/target_context.rb