Class: Mkxms::Mssql::DefaultConstraintHandler
- Inherits:
-
Object
- Object
- Mkxms::Mssql::DefaultConstraintHandler
- Defined in:
- lib/mkxms/mssql/default_constraint_handler.rb
Instance Method Summary collapse
- #handle_text(text, parent_element) ⇒ Object
-
#initialize(constraints, node) ⇒ DefaultConstraintHandler
constructor
A new instance of DefaultConstraintHandler.
Constructor Details
#initialize(constraints, node) ⇒ DefaultConstraintHandler
Returns a new instance of DefaultConstraintHandler.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/mkxms/mssql/default_constraint_handler.rb', line 30 def initialize(constraints, node) a = node.attributes @constraint = DefaultConstraint.new( a['schema'], a['table'], a['column'], a['name'], ).tap do |c| constraints << c end end |
Instance Method Details
#handle_text(text, parent_element) ⇒ Object
42 43 44 |
# File 'lib/mkxms/mssql/default_constraint_handler.rb', line 42 def handle_text(text, parent_element) @constraint.expression << text end |