Class: Nandi::Instructions::AddReference
- Inherits:
-
Object
- Object
- Nandi::Instructions::AddReference
- Defined in:
- lib/nandi/instructions/add_reference.rb
Constant Summary collapse
- DEFAULT_EXTRA_ARGS =
{ index: false }.freeze
Instance Attribute Summary collapse
-
#extra_args ⇒ Object
readonly
Returns the value of attribute extra_args.
-
#ref_name ⇒ Object
readonly
Returns the value of attribute ref_name.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(table:, ref_name:, **kwargs) ⇒ AddReference
constructor
A new instance of AddReference.
- #lock ⇒ Object
- #procedure ⇒ Object
Constructor Details
#initialize(table:, ref_name:, **kwargs) ⇒ AddReference
Returns a new instance of AddReference.
9 10 11 12 13 |
# File 'lib/nandi/instructions/add_reference.rb', line 9 def initialize(table:, ref_name:, **kwargs) @table = table @ref_name = ref_name @extra_args = DEFAULT_EXTRA_ARGS.merge(kwargs) end |
Instance Attribute Details
#extra_args ⇒ Object (readonly)
Returns the value of attribute extra_args.
7 8 9 |
# File 'lib/nandi/instructions/add_reference.rb', line 7 def extra_args @extra_args end |
#ref_name ⇒ Object (readonly)
Returns the value of attribute ref_name.
7 8 9 |
# File 'lib/nandi/instructions/add_reference.rb', line 7 def ref_name @ref_name end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
7 8 9 |
# File 'lib/nandi/instructions/add_reference.rb', line 7 def table @table end |
Instance Method Details
#lock ⇒ Object
19 20 21 |
# File 'lib/nandi/instructions/add_reference.rb', line 19 def lock Nandi::Migration::LockWeights::ACCESS_EXCLUSIVE end |
#procedure ⇒ Object
15 16 17 |
# File 'lib/nandi/instructions/add_reference.rb', line 15 def procedure :add_reference end |