Class: Poleica::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/poleica/configuration.rb

Overview

Configuration class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
11
12
# File 'lib/poleica/configuration.rb', line 8

def initialize
  self.timeout         = 120
  self.libre_office    = init_libre_office_config
  self.graphics_magick = init_graphics_magick_config
end

Instance Attribute Details

#graphics_magickObject

Returns the value of attribute graphics_magick.



6
7
8
# File 'lib/poleica/configuration.rb', line 6

def graphics_magick
  @graphics_magick
end

#libre_officeObject

Returns the value of attribute libre_office.



6
7
8
# File 'lib/poleica/configuration.rb', line 6

def libre_office
  @libre_office
end

#timeoutObject

Returns the value of attribute timeout.



6
7
8
# File 'lib/poleica/configuration.rb', line 6

def timeout
  @timeout
end

Instance Method Details

#init_graphics_magick_configObject



14
15
16
17
18
19
20
21
22
# File 'lib/poleica/configuration.rb', line 14

def init_graphics_magick_config
  {
    bin_paths:
    {
      linux:  '/usr/local/bin/gm',
      osx:    '/usr/local/bin/gm'
    }
  }
end

#init_libre_office_configObject



24
25
26
27
28
29
30
31
32
# File 'lib/poleica/configuration.rb', line 24

def init_libre_office_config
  {
    bin_paths:
    {
      linux:  '/usr/lib/libreoffice/program/soffice.bin',
      osx: '/Applications/LibreOffice.app/Contents/MacOS/soffice.bin'
    }
  }
end