Class: SQLPathResolver

Inherits:
Object
  • Object
show all
Defined in:
lib/kweerie/sql_path_resolver.rb

Defined Under Namespace

Classes: ConfigurationError, SQLFileNotFound

Instance Method Summary collapse

Constructor Details

#initialize(sql_file_location, name = nil) ⇒ SQLPathResolver

Returns a new instance of SQLPathResolver.



7
8
9
10
# File 'lib/kweerie/sql_path_resolver.rb', line 7

def initialize(sql_file_location, name = nil)
  @sql_file_location = sql_file_location
  @name = name
end

Instance Method Details

#resolveObject



12
13
14
15
16
17
# File 'lib/kweerie/sql_path_resolver.rb', line 12

def resolve
  return resolve_root_path if root_path?
  return resolve_relative_path if relative_path?

  resolve_default_path
end