Sha256: 15fc5ad9be486dfcc604d8f933cedaad1feda661693dd5c7baf51dc079180426

Contents?: true

Size: 266 Bytes

Versions: 15

Compression:

Stored size: 266 Bytes

Contents

# frozen_string_literal: true

module ThemeCheck
  module RegexHelpers
    def matches(s, re)
      start_at = 0
      matches = []
      while (m = s.match(re, start_at))
        matches.push(m)
        start_at = m.end(0)
      end
      matches
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
theme-check-0.10.2 lib/theme_check/regex_helpers.rb
theme-check-0.10.1 lib/theme_check/regex_helpers.rb
theme-check-0.10.0 lib/theme_check/regex_helpers.rb
theme-check-0.9.1 lib/theme_check/regex_helpers.rb
theme-check-0.9.0 lib/theme_check/regex_helpers.rb
theme-check-0.8.3 lib/theme_check/regex_helpers.rb
theme-check-0.8.2 lib/theme_check/regex_helpers.rb
theme-check-0.8.1 lib/theme_check/regex_helpers.rb
theme-check-0.8.0 lib/theme_check/regex_helpers.rb
theme-check-0.7.3 lib/theme_check/regex_helpers.rb
theme-check-0.7.2 lib/theme_check/regex_helpers.rb
theme-check-0.7.1 lib/theme_check/regex_helpers.rb
theme-check-0.7.0 lib/theme_check/regex_helpers.rb
theme-check-0.6.0 lib/theme_check/regex_helpers.rb
theme-check-0.5.0 lib/theme_check/regex_helpers.rb