Class: Storey::NativeSchemaMatcher
- Inherits:
-
Object
- Object
- Storey::NativeSchemaMatcher
- Defined in:
- lib/storey/native_schema_matcher.rb
Constant Summary collapse
- NATIVE_SCHEMAS =
['"$user"', 'public']
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(schema_name) ⇒ NativeSchemaMatcher
constructor
A new instance of NativeSchemaMatcher.
- #matches? ⇒ Boolean
Constructor Details
#initialize(schema_name) ⇒ NativeSchemaMatcher
9 10 11 |
# File 'lib/storey/native_schema_matcher.rb', line 9 def initialize(schema_name) @schema_name = schema_name end |
Class Method Details
.matches?(*args) ⇒ Boolean
5 6 7 |
# File 'lib/storey/native_schema_matcher.rb', line 5 def self.matches?(*args) self.new(*args).matches? end |
Instance Method Details
#matches? ⇒ Boolean
13 14 15 16 |
# File 'lib/storey/native_schema_matcher.rb', line 13 def matches? NATIVE_SCHEMAS.include?(@schema_name) || (NATIVE_SCHEMAS - @schema_name.split(',')).empty? end |