class Paru::PandocFilter::Version
Version
is a general Node
containing the pandoc-api-version. It has the format major.minor.revision.sub
Public Class Methods
new(contents)
click to toggle source
Create a Version
node based on contents
@param contents [Array<Integer>] a list with api, major, minor, revision number
# File lib/paru/filter/version.rb, line 31 def initialize(contents) @api, @major, @minor, @revision = contents end
Public Instance Methods
ast_type()
click to toggle source
The AST type is “pandoc-api-version”
# File lib/paru/filter/version.rb, line 36 def ast_type "pandoc-api-version" end
to_ast()
click to toggle source
Create an AST representation of this Version
# File lib/paru/filter/version.rb, line 41 def to_ast() [@api, @major, @minor, @revision].select {|v| !v.nil?} end