Class: NotionRubyMapping::EmojiObject
- Inherits:
-
Object
- Object
- NotionRubyMapping::EmojiObject
- Defined in:
- lib/notion_ruby_mapping/objects/emoji_object.rb
Overview
TextObject
Instance Attribute Summary collapse
-
#emoji ⇒ Object
Returns the value of attribute emoji.
-
#will_update ⇒ Object
readonly
Returns the value of attribute will_update.
Class Method Summary collapse
-
.emoji_object(emoji_or_eo) ⇒ EmojiObject
Self or created EmojiObject.
Instance Method Summary collapse
Constructor Details
#initialize(emoji: nil, json: {}) ⇒ TextObject
8 9 10 11 |
# File 'lib/notion_ruby_mapping/objects/emoji_object.rb', line 8 def initialize(emoji: nil, json: {}) @emoji = emoji || json && json["emoji"] @will_update = false end |
Instance Attribute Details
#emoji ⇒ Object
Returns the value of attribute emoji.
12 13 14 |
# File 'lib/notion_ruby_mapping/objects/emoji_object.rb', line 12 def emoji @emoji end |
#will_update ⇒ Object (readonly)
Returns the value of attribute will_update.
12 13 14 |
# File 'lib/notion_ruby_mapping/objects/emoji_object.rb', line 12 def will_update @will_update end |
Class Method Details
.emoji_object(emoji_or_eo) ⇒ EmojiObject
Returns self or created EmojiObject.
17 18 19 20 21 22 23 |
# File 'lib/notion_ruby_mapping/objects/emoji_object.rb', line 17 def self.emoji_object(emoji_or_eo) if emoji_or_eo.is_a? EmojiObject emoji_or_eo else EmojiObject.new emoji: emoji_or_eo end end |
Instance Method Details
#property_values_json ⇒ Hash
33 34 35 36 37 38 |
# File 'lib/notion_ruby_mapping/objects/emoji_object.rb', line 33 def property_values_json { "type" => "emoji", "emoji" => @emoji, } end |