Sha256: 26a3a37c4d029c0e18f42b3fe6c165b39af6aea15be00f5ffccfe1a5c9dfe253

Contents?: true

Size: 710 Bytes

Versions: 17

Compression:

Stored size: 710 Bytes

Contents

require_relative 'snake_case'

module Hubspot
  module Helpers
    class Path
      def format(module_name)
        Hubspot::Helpers::SnakeCase.new.format(module_name.to_s)
      end

      def require_with_mapping(path)
        require path.gsub('o_auth', 'oauth')
      end

      def require_with_codegen_mapping(path)
        require path
          .gsub('o_auth', 'oauth')
          .gsub('audit_logs/', 'audit-logs/')
          .gsub('blog_posts/', 'blog-posts/')
          .gsub('site_search', 'site-search')
          .gsub('source_code/', 'source-code/')
          .gsub('url_redirects', 'url-redirects')
          .gsub('visitor_identification', 'visitor-identification')
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
hubspot-api-client-17.0.0.pre.beta.4 lib/hubspot/helpers/path.rb
hubspot-api-client-17.0.0.pre.beta.3 lib/hubspot/helpers/path.rb
hubspot-api-client-17.0.0.pre.beta.2 lib/hubspot/helpers/path.rb
hubspot-api-client-17.0.0.pre.beta.1 lib/hubspot/helpers/path.rb
hubspot-api-client-16.4.0 lib/hubspot/helpers/path.rb
hubspot-api-client-16.3.0 lib/hubspot/helpers/path.rb
hubspot-api-client-16.2.1 lib/hubspot/helpers/path.rb
hubspot-api-client-16.2.0 lib/hubspot/helpers/path.rb
hubspot-api-client-16.1.1 lib/hubspot/helpers/path.rb
hubspot-api-client-16.1.0 lib/hubspot/helpers/path.rb
hubspot-api-client-16.0.4 lib/hubspot/helpers/path.rb
hubspot-api-client-16.0.3 lib/hubspot/helpers/path.rb
hubspot-api-client-16.0.2 lib/hubspot/helpers/path.rb
hubspot-api-client-16.0.1 lib/hubspot/helpers/path.rb
hubspot-api-client-16.0.0 lib/hubspot/helpers/path.rb
hubspot-api-client-15.0.2 lib/hubspot/helpers/path.rb
hubspot-api-client-15.0.1 lib/hubspot/helpers/path.rb