Class: Markbridge::AST::Details
- Defined in:
- lib/markbridge/ast/details.rb
Overview
Represents a Discourse [details=…]… collapsible section.
Carries a title string (used as the summary text when the block renders) and any child nodes.
Instance Attribute Summary collapse
-
#title ⇒ String?
readonly
The summary / collapsed-state label.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(title: nil) ⇒ Details
constructor
A new instance of Details.
Methods inherited from Element
#<<, #descendants, #each_descendant, #replace_child
Constructor Details
#initialize(title: nil) ⇒ Details
Returns a new instance of Details.
18 19 20 21 |
# File 'lib/markbridge/ast/details.rb', line 18 def initialize(title: nil) super() @title = title end |
Instance Attribute Details
#title ⇒ String? (readonly)
Returns the summary / collapsed-state label.
15 16 17 |
# File 'lib/markbridge/ast/details.rb', line 15 def title @title end |