👉
Links (Object base class)
1. Singleton methods
equation_object(extression_or_eo)
- [PARAM] expression_or_eo
- expression like as “y = f(x)” (String)
- existing EquationObject
eo = EquationObject.equation_object "y = f(x)"
=> #<NotionRubyMapping::EquationObject:0x00000001093d3920 @expression="y = f(x)", @options={"plain_text"=>"y = f(x)"}, @type="equation", @will_update=false>
eo2 = EquationObject.equation_object eo
=> #<NotionRubyMapping::EquationObject:0x00000001093d3920 @expression="y = f(x)", @options={"plain_text"=>"y = f(x)"}, @type="equation", @will_update=false>
# eo and eo2 are equal object.
2. Instance methods
expression=(str) → str
- [PARAM] str
str like as “z = f(x, y)” (String)
expression=
sets str
to expression, and set will_update
flag to true.
eo = EquationObject.equation_object "y=f(x)"
=> #<NotionRubyMapping::EquationObject:0x0000000107f85018 @expression="y=f(x)", @options={"plain_text"=>"y=f(x)"}, @type="equation", @will_update=false>
eo.expression = "z = f(x, y)"
=> "z = f(x, y)"
eo
=> #<NotionRubyMapping::EquationObject:0x0000000107f85018 @expression="z = f(x, y)", @options={"plain_text"=>"z = f(x, y)"}, @type="equation", @will_update=true>