Class: Utils::Notion::DeletePageBlocks
- Inherits:
-
Object
- Object
- Utils::Notion::DeletePageBlocks
- Defined in:
- lib/bas/utils/notion/delete_page_blocks.rb
Overview
This module is a Notion utility for deleting page blocks.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(params) ⇒ DeletePageBlocks
constructor
Implements the delete page blocks process logic to Notion.
Constructor Details
#initialize(params) ⇒ DeletePageBlocks
Implements the delete page blocks process logic to Notion.
Params:
-
page_id
Id of the notion page. -
secret
Notion secret.
returns HTTParty::Response
23 24 25 |
# File 'lib/bas/utils/notion/delete_page_blocks.rb', line 23 def initialize(params) @params = params end |
Instance Method Details
#execute ⇒ Object
27 28 29 |
# File 'lib/bas/utils/notion/delete_page_blocks.rb', line 27 def execute page_blocks_ids.each { |block_id| delete_block(block_id) } end |