Class: Changes::Delete
- Inherits:
-
Object
- Object
- Changes::Delete
- Defined in:
- lib/dynamic_fields/changes/delete.rb
Instance Attribute Summary collapse
-
#field_name ⇒ Object
readonly
Returns the value of attribute field_name.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(field_name, record) ⇒ Delete
constructor
A new instance of Delete.
- #save ⇒ Object
Constructor Details
#initialize(field_name, record) ⇒ Delete
Returns a new instance of Delete.
5 6 7 8 |
# File 'lib/dynamic_fields/changes/delete.rb', line 5 def initialize(field_name, record) @field_name, @record = field_name, record @value = nil end |
Instance Attribute Details
#field_name ⇒ Object (readonly)
Returns the value of attribute field_name.
3 4 5 |
# File 'lib/dynamic_fields/changes/delete.rb', line 3 def field_name @field_name end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
3 4 5 |
# File 'lib/dynamic_fields/changes/delete.rb', line 3 def record @record end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/dynamic_fields/changes/delete.rb', line 3 def value @value end |
Instance Method Details
#save ⇒ Object
10 11 12 |
# File 'lib/dynamic_fields/changes/delete.rb', line 10 def save record.public_send("#{field_name}_attribute=", nil) end |