Class: KongSchema::Actions::Delete

Inherits:
Object
  • Object
show all
Defined in:
lib/kong_schema/actions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#modelObject (readonly)

Returns the value of attribute model.



32
33
34
# File 'lib/kong_schema/actions.rb', line 32

def model
  @model
end

#recordObject (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

#applyObject



39
40
41
# File 'lib/kong_schema/actions.rb', line 39

def apply(*)
  @model.delete(@record)
end