HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
📌
hkob's Notion
/
NotionRubyMapping idea note
NotionRubyMapping idea note
/
Notion Ruby Mapping Public API Reference
Notion Ruby Mapping Public API Reference
/
⭕
TextObject
⭕

TextObject

👉
Links (Object base class)
⭕
CommentObject
⭕
FileObject
⭕
TextObject
⭕
EmojiObject
⭕
FileUploadObject
⭕
UserObject
⭕
EquationObject
⭕
MentionObject
Notion Ruby Mapping Public API Reference
Notion Ruby Mapping Public API Reference
ℹ️
↑ Table of Contents
1. Class methodstext_object(value)2. Instance methodsbold=(flag) code=(flag) color=(color) italic=(flag) strikethrough=(flag) underline=(flag)text=(str)
TextObject is a subclass of RichTextObject.

1. Class methods

text_object(value)

  • [PARAM] value
    • a text (String)
    • existing TextObject
to = TextObject.text_object "a text" => #<NotionRubyMapping::TextObject:0x0000000105a82590 @options={"plain_text"=>"a text"}, @text="a text", @type="text", @will_update=false> to2 = TextObject.text_object to => #<NotionRubyMapping::TextObject:0x0000000105a82590 @options={"plain_text"=>"a text"}, @text="a text", @type="text", @will_update=false> # to and to2 are equal objects.
ℹ️
↑ Table of Contents

2. Instance methods

bold=(flag) code=(flag) color=(color) italic=(flag) strikethrough=(flag) underline=(flag)

  • [PARAM] flag true if the RichTextObject is bold/code/italic/strikethrough/underline text
  • [PARAM] color color string for color=
bold=, code=, italic=, strikethrough= and underline= set the correspond flag. color= sets the object color.
property.bold = true property.code = true property.color = "default" property.italic = true property.strikethrough = true property.underline = true
ℹ️
↑ Table of Contents

text=(str)

  • [PARAM] str new text (String)
text= sets str to text and plain_text, and set will_update flag to true.
to = TextObject.text_object "a text" => #<NotionRubyMapping::TextObject:0x0000000105a82590 @options={"plain_text"=>"a text"}, @text="a text", @type="text", @will_update=false> to.text = "new text" => "new text" => #<NotionRubyMapping::TextObject:0x0000000105a82590 @options={"plain_text"=>"new text"}, @text="new text", @type="text", @will_update=true>
ℹ️
↑ Table of Contents