Exception: SchemaEvolutionManager::ScriptError
- Inherits:
-
Exception
- Object
- Exception
- SchemaEvolutionManager::ScriptError
- Defined in:
- lib/schema-evolution-manager/script_error.rb
Instance Attribute Summary collapse
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #dml ⇒ Object
-
#initialize(db, filename, path, output) ⇒ ScriptError
constructor
A new instance of ScriptError.
Constructor Details
#initialize(db, filename, path, output) ⇒ ScriptError
Returns a new instance of ScriptError.
7 8 9 10 11 12 |
# File 'lib/schema-evolution-manager/script_error.rb', line 7 def initialize(db, filename, path, output) @db = Preconditions.assert_class(db, Db) @filename = Preconditions.assert_class(filename, String) @path = Preconditions.assert_class(path, String) @output = Preconditions.assert_class(output, String) end |
Instance Attribute Details
#output ⇒ Object (readonly)
Returns the value of attribute output.
5 6 7 |
# File 'lib/schema-evolution-manager/script_error.rb', line 5 def output @output end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/schema-evolution-manager/script_error.rb', line 5 def path @path end |
Instance Method Details
#dml ⇒ Object
14 15 16 17 |
# File 'lib/schema-evolution-manager/script_error.rb', line 14 def dml sql_command = "insert into %s.%s (filename) values ('%s')" % [Db.schema_name, Scripts::SCRIPTS, @filename] "psql --command \"%s\" %s" % [sql_command, @db.url] end |