Class: Paru::PandocFilter::Version
- Defined in:
- lib/paru/filter/version.rb
Overview
Version is a general Node containing the pandoc-api-version. It has the format major.minor.revision.sub
Instance Method Summary collapse
-
#ast_type ⇒ Object
The AST type is “pandoc-api-version”.
-
#initialize(contents) ⇒ Version
constructor
Create a Version node based on contents.
-
#to_ast ⇒ Object
Create an AST representation of this Version.
Constructor Details
#initialize(contents) ⇒ Version
Create a Version node based on contents
revision number
32 33 34 |
# File 'lib/paru/filter/version.rb', line 32 def initialize(contents) @api, @major, @minor, @revision = contents end |
Instance Method Details
#ast_type ⇒ Object
The AST type is “pandoc-api-version”
37 38 39 |
# File 'lib/paru/filter/version.rb', line 37 def ast_type 'pandoc-api-version' end |
#to_ast ⇒ Object
Create an AST representation of this Version
42 43 44 |
# File 'lib/paru/filter/version.rb', line 42 def to_ast [@api, @major, @minor, @revision].compact end |