Module: CommandWrap::Config::OpenOffice
- Defined in:
- lib/command_wrap/config/open_office.rb
Class Method Summary collapse
- .command ⇒ Object
- .executable ⇒ Object
- .executable=(openoffice) ⇒ Object
- .host ⇒ Object
- .host=(host) ⇒ Object
- .params ⇒ Object
- .params=(params) ⇒ Object
- .parsed_params ⇒ Object
- .port ⇒ Object
- .port=(port) ⇒ Object
- .python ⇒ Object
- .python=(python) ⇒ Object
- .stop ⇒ Object
- .stop=(stop) ⇒ Object
- .stop_xvfb ⇒ Object
- .stop_xvfb=(stop_xvfb) ⇒ Object
- .xvfb ⇒ Object
- .xvfb=(xvfb) ⇒ Object
Class Method Details
.command ⇒ Object
5 6 7 |
# File 'lib/command_wrap/config/open_office.rb', line 5 def self.command "#{executable} #{parsed_params}" end |
.executable ⇒ Object
13 14 15 |
# File 'lib/command_wrap/config/open_office.rb', line 13 def self.executable @openoffice ||= "soffice" end |
.executable=(openoffice) ⇒ Object
17 18 19 |
# File 'lib/command_wrap/config/open_office.rb', line 17 def self.executable= (openoffice) @openoffice = openoffice end |
.host ⇒ Object
29 30 31 |
# File 'lib/command_wrap/config/open_office.rb', line 29 def self.host @host ||= "127.0.0.1" end |
.host=(host) ⇒ Object
33 34 35 |
# File 'lib/command_wrap/config/open_office.rb', line 33 def self.host= (host) @host = host end |
.params ⇒ Object
37 38 39 |
# File 'lib/command_wrap/config/open_office.rb', line 37 def self.params @params ||= '-headless -display :30 -accept="socket,host=[host],port=[port];urp;" -nofirststartwizard' end |
.params=(params) ⇒ Object
41 42 43 |
# File 'lib/command_wrap/config/open_office.rb', line 41 def self.params= (params) @params = params end |
.parsed_params ⇒ Object
9 10 11 |
# File 'lib/command_wrap/config/open_office.rb', line 9 def self.parsed_params params.gsub('[port]', port.to_s).gsub('[host]', host) end |
.port ⇒ Object
21 22 23 |
# File 'lib/command_wrap/config/open_office.rb', line 21 def self.port @port ||= 8000 end |
.port=(port) ⇒ Object
25 26 27 |
# File 'lib/command_wrap/config/open_office.rb', line 25 def self.port= (port) @port = port end |
.python ⇒ Object
69 70 71 |
# File 'lib/command_wrap/config/open_office.rb', line 69 def self.python @python ||= 'python' end |
.python=(python) ⇒ Object
73 74 75 |
# File 'lib/command_wrap/config/open_office.rb', line 73 def self.python= (python) @python = python end |
.stop ⇒ Object
61 62 63 |
# File 'lib/command_wrap/config/open_office.rb', line 61 def self.stop @stop ||= 'killall -9 soffice.bin' end |
.stop=(stop) ⇒ Object
65 66 67 |
# File 'lib/command_wrap/config/open_office.rb', line 65 def self.stop= (stop) @stop = stop end |
.stop_xvfb ⇒ Object
53 54 55 |
# File 'lib/command_wrap/config/open_office.rb', line 53 def self.stop_xvfb @stop_xvfb ||= 'killall -9 Xvfb' end |
.stop_xvfb=(stop_xvfb) ⇒ Object
57 58 59 |
# File 'lib/command_wrap/config/open_office.rb', line 57 def self.stop_xvfb= (stop_xvfb) @stop_xvfb = stop_xvfb end |
.xvfb ⇒ Object
45 46 47 |
# File 'lib/command_wrap/config/open_office.rb', line 45 def self.xvfb @xvfb ||= 'Xvfb :30 -screen 0 1024x768x24' end |
.xvfb=(xvfb) ⇒ Object
49 50 51 |
# File 'lib/command_wrap/config/open_office.rb', line 49 def self.xvfb= (xvfb) @xvfb = xvfb end |