Class: NotionRb::Operations::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/notion_rb/operations/factory.rb

Constant Summary collapse

OPERATIONS =
Hash[
[
  ListAfter,
  SetBlockCreatedTime,
  SetBlockLastEditedTime,
  SetBlockTitle,
  SetBlockType,
  UpdateParent
]

Class Method Summary collapse

Class Method Details

.build(operation_name, *args) ⇒ Object



24
25
26
27
28
# File 'lib/notion_rb/operations/factory.rb', line 24

def self.build(operation_name, *args)
  OPERATIONS.fetch(operation_name).new(
    *args
  )
end