Method: NotionRubyMapping::ColumnBlock#block_json

Defined in:
lib/notion_ruby_mapping/blocks/column_block.rb

#block_json(not_update: true) ⇒ Hash{String (frozen)->Hash

Returns ].

Parameters:

  • not_update (Boolean) (defaults to: true)

    false when update

Returns:

  • (Hash{String (frozen)->Hash)

    ]



27
28
29
30
31
32
# File 'lib/notion_ruby_mapping/blocks/column_block.rb', line 27

def block_json(not_update: true)
  ans = super
  ans[type] = @width_ratio ? {"width_ratio" => @width_ratio} : {}
  ans[type]["children"] = @sub_blocks.map(&:block_json) if @sub_blocks
  ans
end