Class: DbDiff::TableElement
- Inherits:
-
Object
- Object
- DbDiff::TableElement
- Defined in:
- lib/dbdiff/table_element.rb
Direct Known Subclasses
Column, ForeignKey, Key, Row, Trigger
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
- #deep_clone ⇒ Object
-
#initialize(info = {}) ⇒ TableElement
constructor
A new instance of TableElement.
Constructor Details
#initialize(info = {}) ⇒ TableElement
Returns a new instance of TableElement.
5 6 7 |
# File 'lib/dbdiff/table_element.rb', line 5 def initialize(info = {}) @table_name = info['TABLE_NAME'] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/dbdiff/table_element.rb', line 3 def name @name end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
3 4 5 |
# File 'lib/dbdiff/table_element.rb', line 3 def table_name @table_name end |
Instance Method Details
#deep_clone ⇒ Object
10 11 12 |
# File 'lib/dbdiff/table_element.rb', line 10 def deep_clone Marshal::load(Marshal.dump(self)) end |