Class: DBCode::SearchPath

Inherits:
Object
  • Object
show all
Defined in:
lib/dbcode/schema.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ SearchPath

Returns a new instance of SearchPath.



3
4
5
# File 'lib/dbcode/schema.rb', line 3

def initialize(path)
  @path = path.to_s.split ','
end

Instance Method Details

#append(schema) ⇒ Object



11
12
13
# File 'lib/dbcode/schema.rb', line 11

def append(schema)
  from_parts path + [schema]
end

#prepend(schema) ⇒ Object



7
8
9
# File 'lib/dbcode/schema.rb', line 7

def prepend(schema)
  from_parts [schema] + path
end

#to_sObject



15
16
17
# File 'lib/dbcode/schema.rb', line 15

def to_s
  path.join ','
end