Sha256: 2bd15e474602bd5c868a339e1a153e4916d31514ef0439014ad488dbb6e28643

Contents?: true

Size: 309 Bytes

Versions: 14

Compression:

Stored size: 309 Bytes

Contents

# frozen_string_literal: true

module Lokalise
  module Utils
    module EndpointHelpers
      def path_from(raw_mapping)
        template = Addressable::Template.new '{/segments*}'
        template.expand(
          segments: raw_mapping.to_a.flatten
        ).to_s
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby-lokalise-api-5.0.0 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-4.5.1 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-4.5.0 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-4.4.0 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-4.3.1 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-4.3.0 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-4.2.0 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-4.1.0 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-4.0.0 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-3.1.0 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-3.0.0 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-2.10.0 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-2.9.0.1 lib/ruby-lokalise-api/utils/endpoint_helpers.rb
ruby-lokalise-api-2.9.0 lib/ruby-lokalise-api/utils/endpoint_helpers.rb