Sha256: 3a8b63d1f1d7c13f79abe0b893b06f04d98f38be130e2fe75cef408f70674e68

Contents?: true

Size: 348 Bytes

Versions: 22

Compression:

Stored size: 348 Bytes

Contents

module Pansophy
  module Helpers
    class PathBuilder
      def initialize(file, directory)
        @file      = file
        @directory = directory
      end

      def relative_path
        return @file.pathname if @directory.pathname.to_s.empty?
        @file.pathname.sub(::File.join(@directory.pathname, '/'), '')
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
pansophy-1.3.0 lib/pansophy/helpers/path_builder.rb
pansophy-1.2.0 lib/pansophy/helpers/path_builder.rb
pansophy-1.1.0 lib/pansophy/helpers/path_builder.rb
pansophy-1.0.0 lib/pansophy/helpers/path_builder.rb
pansophy-1.0.0.pre.alpha.0 lib/pansophy/helpers/path_builder.rb
pansophy-0.6.0 lib/pansophy/helpers/path_builder.rb
pansophy-0.5.6 lib/pansophy/helpers/path_builder.rb
pansophy-0.5.5 lib/pansophy/helpers/path_builder.rb
pansophy-0.5.4 lib/pansophy/helpers/path_builder.rb
pansophy-0.5.3 lib/pansophy/helpers/path_builder.rb
pansophy-0.5.2 lib/pansophy/helpers/path_builder.rb
pansophy-0.5.1 lib/pansophy/helpers/path_builder.rb
pansophy-0.5.0 lib/pansophy/helpers/path_builder.rb
pansophy-0.4.0 lib/pansophy/helpers/path_builder.rb
pansophy-0.3.0 lib/pansophy/helpers/path_builder.rb
pansophy-0.2.6 lib/pansophy/helpers/path_builder.rb
pansophy-0.2.5 lib/pansophy/helpers/path_builder.rb
pansophy-0.2.4 lib/pansophy/helpers/path_builder.rb
pansophy-0.2.3 lib/pansophy/helpers/path_builder.rb
pansophy-0.2.1 lib/pansophy/helpers/path_builder.rb