Sha256: 93424525a39618bc28f15bc783919c11f3caae2721a4a579a8860136d3212f66

Contents?: true

Size: 368 Bytes

Versions: 4

Compression:

Stored size: 368 Bytes

Contents

# frozen_string_literal: true

module Watir
  module Generator
    module Util
      module_function

      def classify(regexp, str)
        if str =~ regexp
          Regexp.last_match(1)
        else
          str
        end
      end

      def paramify(regexp, str)
        classify(regexp, str).snake_case
      end
    end # Util
  end # Generator
end # Watir

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
watir-7.3.0 lib/watir/generator/base/util.rb
watir-7.2.2 lib/watir/generator/base/util.rb
watir-7.2.1 lib/watir/generator/base/util.rb
watir-7.2.0 lib/watir/generator/base/util.rb