Class: NotionRubyMapping::EquationObject
- Inherits:
-
RichTextObject
- Object
- RichTextObject
- NotionRubyMapping::EquationObject
- Defined in:
- lib/notion_ruby_mapping/objects/equation_object.rb
Overview
EquationObject
Instance Attribute Summary collapse
-
#expression ⇒ Object
Returns the value of attribute expression.
-
#will_update ⇒ Object
readonly
Returns the value of attribute will_update.
Attributes inherited from RichTextObject
Class Method Summary collapse
-
.equation_object(expression_or_eo) ⇒ EquationObject
Self or created EquationObject.
Instance Method Summary collapse
Methods inherited from RichTextObject
#bold=, #clear_will_update, #code=, #color=, create_from_json, #href=, #italic=, #plain_text=, #property_values_json, #strikethrough=, text_object, #underline=
Constructor Details
#initialize(expression, options = {}) ⇒ TextObject
8 9 10 11 12 |
# File 'lib/notion_ruby_mapping/objects/equation_object.rb', line 8 def initialize(expression, = {}) super "equation", {"plain_text" => expression}.merge() @expression = expression @will_update = false end |
Instance Attribute Details
#expression ⇒ Object
Returns the value of attribute expression.
13 14 15 |
# File 'lib/notion_ruby_mapping/objects/equation_object.rb', line 13 def expression @expression end |
#will_update ⇒ Object (readonly)
Returns the value of attribute will_update.
13 14 15 |
# File 'lib/notion_ruby_mapping/objects/equation_object.rb', line 13 def will_update @will_update end |
Class Method Details
.equation_object(expression_or_eo) ⇒ EquationObject
Returns self or created EquationObject.
18 19 20 21 22 23 24 |
# File 'lib/notion_ruby_mapping/objects/equation_object.rb', line 18 def self.equation_object(expression_or_eo) if expression_or_eo.is_a? EquationObject expression_or_eo else EquationObject.new expression_or_eo end end |
Instance Method Details
#text ⇒ String (frozen)
35 36 37 |
# File 'lib/notion_ruby_mapping/objects/equation_object.rb', line 35 def text @expression end |