Sha256: 2dbdacc0f787880a4a12391c37495ed8a18586490cad1c9835803f25e638d959

Contents?: true

Size: 370 Bytes

Versions: 14

Compression:

Stored size: 370 Bytes

Contents

module Storey
  class NativeSchemaMatcher
    NATIVE_SCHEMAS = ['"$user"', 'public']

    def self.matches?(*args)
      self.new(*args).matches?
    end

    def initialize(schema_name)
      @schema_name = schema_name
    end

    def matches?
      NATIVE_SCHEMAS.include?(@schema_name) ||
        (NATIVE_SCHEMAS - @schema_name.split(',')).empty?
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
storey-2.2.0 lib/storey/native_schema_matcher.rb
storey-2.1.2 lib/storey/native_schema_matcher.rb
storey-2.1.1 lib/storey/native_schema_matcher.rb
storey-2.1.0 lib/storey/native_schema_matcher.rb
storey-2.0.2 lib/storey/native_schema_matcher.rb
storey-2.0.1 lib/storey/native_schema_matcher.rb
storey-2.0.0 lib/storey/native_schema_matcher.rb
storey-1.0.0 lib/storey/native_schema_matcher.rb
storey-0.6.0 lib/storey/native_schema_matcher.rb
storey-0.5.2 lib/storey/native_schema_matcher.rb
storey-0.5.1 lib/storey/native_schema_matcher.rb
storey-0.5.0 lib/storey/native_schema_matcher.rb
storey-0.4.2 lib/storey/native_schema_matcher.rb
storey-0.4.1 lib/storey/native_schema_matcher.rb