Sha256: db325a48f17e425e3a02581a9c438b25c1728ee1f5cf8c2b81311dc96d223d12

Contents?: true

Size: 283 Bytes

Versions: 13

Compression:

Stored size: 283 Bytes

Contents

# frozen_string_literal: true

module OembedProxy
  # Utility methods
  module Utility
    def self.clean_pattern(pattern_raw)
      pattern = pattern_raw.strip.freeze

      if pattern =~ /^#.*#i$/
        pattern.slice(1..-3)
      else
        pattern
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
oembed_proxy-0.3 lib/oembed_proxy/utility.rb
oembed_proxy-0.2.6 lib/oembed_proxy/utility.rb
oembed_proxy-0.2.5 lib/oembed_proxy/utility.rb
oembed_proxy-0.2.4 lib/oembed_proxy/utility.rb
oembed_proxy-0.2.3 lib/oembed_proxy/utility.rb
oembed_proxy-0.2.2 lib/oembed_proxy/utility.rb
oembed_proxy-0.2.1 lib/oembed_proxy/utility.rb
oembed_proxy-0.2.0 lib/oembed_proxy/utility.rb
oembed_proxy-0.1.4 lib/oembed_proxy/utility.rb
oembed_proxy-0.1.3 lib/oembed_proxy/utility.rb
oembed_proxy-0.1.2 lib/oembed_proxy/utility.rb
oembed_proxy-0.1.1 lib/oembed_proxy/utility.rb
oembed_proxy-0.1.0 lib/oembed_proxy/utility.rb