Class: KongSchema::Actions::Delete
- Inherits:
-
Object
- Object
- KongSchema::Actions::Delete
- Defined in:
- lib/kong_schema/actions.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
- #apply ⇒ Object
-
#initialize(model:, record:) ⇒ Delete
constructor
A new instance of Delete.
Constructor Details
#initialize(model:, record:) ⇒ Delete
Returns a new instance of Delete.
34 35 36 37 |
# File 'lib/kong_schema/actions.rb', line 34 def initialize(model:, record:) @model = model @record = record end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
32 33 34 |
# File 'lib/kong_schema/actions.rb', line 32 def model @model end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
32 33 34 |
# File 'lib/kong_schema/actions.rb', line 32 def record @record end |
Instance Method Details
#apply ⇒ Object
39 40 41 |
# File 'lib/kong_schema/actions.rb', line 39 def apply(*) @model.delete(@record) end |