Class: Superset::Dataset::Delete
- Defined in:
- lib/superset/dataset/delete.rb
Constant Summary
Constants inherited from Request
Instance Attribute Summary collapse
-
#dataset_id ⇒ Object
readonly
Returns the value of attribute dataset_id.
Attributes inherited from Request
Instance Method Summary collapse
-
#initialize(dataset_id:) ⇒ Delete
constructor
A new instance of Delete.
- #perform ⇒ Object
- #response ⇒ Object
Methods inherited from Request
call, #query_params, #result, #superset_host
Methods included from Superset::Display
#display_headers, #headings, #list, #list_attributes, #result, #rows, #table, #title
Constructor Details
#initialize(dataset_id:) ⇒ Delete
Returns a new instance of Delete.
8 9 10 |
# File 'lib/superset/dataset/delete.rb', line 8 def initialize(dataset_id: ) @dataset_id = dataset_id end |
Instance Attribute Details
#dataset_id ⇒ Object (readonly)
Returns the value of attribute dataset_id.
6 7 8 |
# File 'lib/superset/dataset/delete.rb', line 6 def dataset_id @dataset_id end |
Instance Method Details
#perform ⇒ Object
12 13 14 15 16 17 |
# File 'lib/superset/dataset/delete.rb', line 12 def perform raise InvalidParameterError, "dataset_id integer is required" unless dataset_id.present? && dataset_id.is_a?(Integer) logger.info("Attempting to delete dataset with id: #{dataset_id}") response end |
#response ⇒ Object
19 20 21 |
# File 'lib/superset/dataset/delete.rb', line 19 def response @response ||= client.delete(route) end |