Class: Gemtext::Preformatted
Instance Attribute Summary
Attributes inherited from Node
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content, caption = nil) ⇒ Preformatted
constructor
A new instance of Preformatted.
- #inspect ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(content, caption = nil) ⇒ Preformatted
Returns a new instance of Preformatted.
3 4 5 6 |
# File 'lib/gemtext/preformatted.rb', line 3 def initialize(content, = nil) super content @caption = end |
Class Method Details
.[](content, caption = nil) ⇒ Object
8 9 10 |
# File 'lib/gemtext/preformatted.rb', line 8 def self.[](content, = nil) new content, end |
Instance Method Details
#inspect ⇒ Object
12 13 14 |
# File 'lib/gemtext/preformatted.rb', line 12 def inspect "#{self.class}{#{content}|{#{@caption}}" end |