Class: BrandEinsSetup

Inherits:
Object
  • Object
show all
Defined in:
lib/brandeins/setup.rb

Instance Method Summary collapse

Constructor Details

#initializeBrandEinsSetup

Returns a new instance of BrandEinsSetup.



2
3
4
5
6
7
8
9
10
# File 'lib/brandeins/setup.rb', line 2

def initialize
  p 'Checking requirements for your system'
  if pdftk?
    p 'It seems you have pdftk installed on your system.'
  else
    p 'It seems you are missing pdfk on your system.'
    p pdfk_install_instructions
  end
end

Instance Method Details

#pdfk_install_instructionsObject



12
13
14
# File 'lib/brandeins/setup.rb', line 12

def pdfk_install_instructions
  'Visit http://www.pdflabs.com/docs/install-pdftk/ to install pdftk on your system'
end

#pdftk?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/brandeins/setup.rb', line 16

def pdftk?
  cmd? 'pdftk --version', 'pdftk.com'
end