Class: Paru::PandocFilter::RawBlock
- Includes:
- InnerMarkdown
- Defined in:
- lib/paru/filter/raw_block.rb
Overview
A RawBlock node has a format and a string contents
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#ast_contents ⇒ Object
Create an AST representation of this RawBlock node.
-
#has_string? ⇒ Boolean
Has this RawBlock node a string value?.
-
#initialize(contents) ⇒ RawBlock
constructor
Create a new RawBlock node based on the contents.
-
#inner_markdown ⇒ String
included
from InnerMarkdown
Get the markdown representation of this Node's children.
-
#inner_markdown=(markdown) ⇒ Object
included
from InnerMarkdown
Replace this Node's children with the Nodes represented by the markdown string.
Constructor Details
#initialize(contents) ⇒ RawBlock
Create a new RawBlock node based on the contents
38 39 40 |
# File 'lib/paru/filter/raw_block.rb', line 38 def initialize(contents) @format, @string = contents end |
Instance Attribute Details
#format ⇒ String
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/paru/filter/raw_block.rb', line 31 class RawBlock < Block include InnerMarkdown attr_accessor :format, :string # Create a new RawBlock node based on the contents # # @param contents [Array] def initialize(contents) @format, @string = contents end # Create an AST representation of this RawBlock node def ast_contents() [ @format, @string ] end # Has this RawBlock node a string value? # # @return [Boolean] true def has_string? true end end |
#string ⇒ String
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/paru/filter/raw_block.rb', line 31 class RawBlock < Block include InnerMarkdown attr_accessor :format, :string # Create a new RawBlock node based on the contents # # @param contents [Array] def initialize(contents) @format, @string = contents end # Create an AST representation of this RawBlock node def ast_contents() [ @format, @string ] end # Has this RawBlock node a string value? # # @return [Boolean] true def has_string? true end end |
Instance Method Details
#ast_contents ⇒ Object
Create an AST representation of this RawBlock node
43 44 45 46 47 48 |
# File 'lib/paru/filter/raw_block.rb', line 43 def ast_contents() [ @format, @string ] end |
#has_string? ⇒ Boolean
Has this RawBlock node a string value?
53 54 55 |
# File 'lib/paru/filter/raw_block.rb', line 53 def has_string? true end |
#inner_markdown ⇒ String Originally defined in module InnerMarkdown
Get the markdown representation of this Node's children.
#inner_markdown=(markdown) ⇒ Object Originally defined in module InnerMarkdown
Replace this Node's children with the Nodes represented by the markdown string