Class: Paru::PandocFilter::Str
- Defined in:
- lib/paru/filter/str.rb
Overview
A Str node represents a string
Instance Attribute Summary collapse
-
#string ⇒ String
The value of this Str node.
Instance Method Summary collapse
-
#ast_contents ⇒ Object
The AST contents.
-
#has_inline? ⇒ Boolean
Has the Str node inline contents?.
-
#has_string? ⇒ Boolean
Has the Str node a string value? Of course!.
-
#initialize(value) ⇒ Str
constructor
Create a new Str node based on the value.
Constructor Details
#initialize(value) ⇒ Str
Create a new Str node based on the value
34 35 36 |
# File 'lib/paru/filter/str.rb', line 34 def initialize(value) @string = value end |
Instance Attribute Details
#string ⇒ String
Returns the value of this Str node.
27 28 29 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 |
# File 'lib/paru/filter/str.rb', line 27 class Str < Inline attr_accessor :string # Create a new Str node based on the value # # @param value [String] def initialize(value) @string = value end # The AST contents def ast_contents() @string end # Has the Str node a string value? Of course! # # @return [Boolean] true def has_string?() true end # Has the Str node inline contents? # # @return [Boolean] false def has_inline?() false end end |
Instance Method Details
#ast_contents ⇒ Object
The AST contents
39 40 41 |
# File 'lib/paru/filter/str.rb', line 39 def ast_contents() @string end |
#has_inline? ⇒ Boolean
Has the Str node inline contents?
53 54 55 |
# File 'lib/paru/filter/str.rb', line 53 def has_inline?() false end |
#has_string? ⇒ Boolean
Has the Str node a string value? Of course!
46 47 48 |
# File 'lib/paru/filter/str.rb', line 46 def has_string?() true end |