Class: Metanorma::Html::Drops::BlockElementDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Metanorma::Html::Drops::BlockElementDrop
- Defined in:
- lib/metanorma/html/drops/block_element_drop.rb
Direct Known Subclasses
AdmonitionDrop, ExampleDrop, FigureDrop, FormulaDrop, NoteDrop, SourcecodeDrop
Instance Attribute Summary collapse
-
#content_html ⇒ Object
readonly
Returns the value of attribute content_html.
-
#css_class ⇒ Object
readonly
Returns the value of attribute css_class.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label_html ⇒ Object
readonly
Returns the value of attribute label_html.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
-
.from_model(_model, renderer:) ⇒ Object
Subclasses override to build from model + RendererContext.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ BlockElementDrop
constructor
A new instance of BlockElementDrop.
Constructor Details
#initialize(attrs = {}) ⇒ BlockElementDrop
Returns a new instance of BlockElementDrop.
9 10 11 |
# File 'lib/metanorma/html/drops/block_element_drop.rb', line 9 def initialize(attrs = {}) attrs.each { |k, v| instance_variable_set(:"@#{k}", v) } end |
Instance Attribute Details
#content_html ⇒ Object (readonly)
Returns the value of attribute content_html.
7 8 9 |
# File 'lib/metanorma/html/drops/block_element_drop.rb', line 7 def content_html @content_html end |
#css_class ⇒ Object (readonly)
Returns the value of attribute css_class.
7 8 9 |
# File 'lib/metanorma/html/drops/block_element_drop.rb', line 7 def css_class @css_class end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/metanorma/html/drops/block_element_drop.rb', line 7 def id @id end |
#label_html ⇒ Object (readonly)
Returns the value of attribute label_html.
7 8 9 |
# File 'lib/metanorma/html/drops/block_element_drop.rb', line 7 def label_html @label_html end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/metanorma/html/drops/block_element_drop.rb', line 7 def type @type end |
Class Method Details
.from_model(_model, renderer:) ⇒ Object
Subclasses override to build from model + RendererContext
14 15 16 |
# File 'lib/metanorma/html/drops/block_element_drop.rb', line 14 def self.from_model(_model, renderer:) raise NotImplementedError, "#{name} must implement .from_model" end |