Class: HecksAdapters::ResourceServer::Methods::Delete
- Inherits:
-
Object
- Object
- HecksAdapters::ResourceServer::Methods::Delete
- Defined in:
- lib/methods/delete.rb
Overview
Delete a resource
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #call(id:, module_name:) ⇒ Object
-
#initialize(application_adapter:) ⇒ Delete
constructor
A new instance of Delete.
- #status ⇒ Object
Constructor Details
#initialize(application_adapter:) ⇒ Delete
Returns a new instance of Delete.
9 10 11 |
# File 'lib/methods/delete.rb', line 9 def initialize(application_adapter:) @application_adapter = application_adapter end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
7 8 9 |
# File 'lib/methods/delete.rb', line 7 def result @result end |
Instance Method Details
#call(id:, module_name:) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/methods/delete.rb', line 13 def call(id:, module_name:) @id = id @module_name = module_name.to_sym run_command convert_to_json self end |
#status ⇒ Object
21 22 23 24 |
# File 'lib/methods/delete.rb', line 21 def status return 500 if command_result.errors.count.positive? 200 end |