Class: Limarka::Check
- Inherits:
-
Object
- Object
- Limarka::Check
- Defined in:
- lib/limarka/check.rb
Overview
Possibilita checar dependencias: pandoc Ver github.com/abntex/limarka/issues/165
Constant Summary collapse
- PANDOC_VERSAO_MINIMA =
'1.19.1'
- PANDOC_VERSAO_MAXIMA =
'3.0.0'
Instance Attribute Summary collapse
-
#pandoc ⇒ Object
Returns the value of attribute pandoc.
-
#sistema ⇒ Object
Returns the value of attribute sistema.
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(pandoc: nil, sistema: true) ⇒ Check
constructor
A new instance of Check.
- #ler_pandoc_version ⇒ Object
Constructor Details
#initialize(pandoc: nil, sistema: true) ⇒ Check
Returns a new instance of Check.
14 15 16 17 |
# File 'lib/limarka/check.rb', line 14 def initialize(pandoc: nil, sistema: true) self.pandoc = pandoc self.sistema = sistema end |
Instance Attribute Details
#pandoc ⇒ Object
Returns the value of attribute pandoc.
9 10 11 |
# File 'lib/limarka/check.rb', line 9 def pandoc @pandoc end |
#sistema ⇒ Object
Returns the value of attribute sistema.
10 11 12 |
# File 'lib/limarka/check.rb', line 10 def sistema @sistema end |
Instance Method Details
#check ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/limarka/check.rb', line 19 def check if sistema ler_pandoc_version end verifica_compatibilidade puts "OK." end |
#ler_pandoc_version ⇒ Object
27 28 29 |
# File 'lib/limarka/check.rb', line 27 def ler_pandoc_version self.pandoc = `pandoc --version`.split("\n")[0].split(" ")[1] end |