Class: DBCode::SearchPath
- Inherits:
-
Object
- Object
- DBCode::SearchPath
- Defined in:
- lib/dbcode/schema.rb
Instance Method Summary collapse
- #append(schema) ⇒ Object
-
#initialize(path) ⇒ SearchPath
constructor
A new instance of SearchPath.
- #prepend(schema) ⇒ Object
- #to_s ⇒ Object
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_s ⇒ Object
15 16 17 |
# File 'lib/dbcode/schema.rb', line 15 def to_s path.join ',' end |