Class: Paru::PandocFilter::RawInline
- Defined in:
- lib/paru/filter/raw_inline.rb
Overview
A RawInline node has a format and a string value
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#ast_contents ⇒ Array
The AST contents.
-
#has_inline? ⇒ Boolean
Has this RawInline inline contents?.
-
#has_string? ⇒ Boolean
Has this RawInline a string value?.
-
#initialize(contents) ⇒ RawInline
constructor
Create a new RawInline node based on the contents.
Constructor Details
#initialize(contents) ⇒ RawInline
Create a new RawInline node based on the contents
36 37 38 |
# File 'lib/paru/filter/raw_inline.rb', line 36 def initialize(contents) @format, @string = contents end |
Instance Attribute Details
#format ⇒ String
30 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 57 58 59 60 61 62 63 |
# File 'lib/paru/filter/raw_inline.rb', line 30 class RawInline < Inline attr_accessor :format, :string # Create a new RawInline node based on the contents # # @param contents [Array] def initialize(contents) @format, @string = contents end # The AST contents # # @return [Array] def ast_contents() [ @format, @string ] end # Has this RawInline a string value? # # @return [Boolean] true def has_string?() true end # Has this RawInline inline contents? # # @return [Boolean] false def has_inline?() false end end |
#string ⇒ String
30 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 57 58 59 60 61 62 63 |
# File 'lib/paru/filter/raw_inline.rb', line 30 class RawInline < Inline attr_accessor :format, :string # Create a new RawInline node based on the contents # # @param contents [Array] def initialize(contents) @format, @string = contents end # The AST contents # # @return [Array] def ast_contents() [ @format, @string ] end # Has this RawInline a string value? # # @return [Boolean] true def has_string?() true end # Has this RawInline inline contents? # # @return [Boolean] false def has_inline?() false end end |
Instance Method Details
#ast_contents ⇒ Array
The AST contents
43 44 45 46 47 48 |
# File 'lib/paru/filter/raw_inline.rb', line 43 def ast_contents() [ @format, @string ] end |
#has_inline? ⇒ Boolean
Has this RawInline inline contents?
60 61 62 |
# File 'lib/paru/filter/raw_inline.rb', line 60 def has_inline?() false end |
#has_string? ⇒ Boolean
Has this RawInline a string value?
53 54 55 |
# File 'lib/paru/filter/raw_inline.rb', line 53 def has_string?() true end |