Class: Uniword::LinuxWordImplementation

Inherits:
WordImplementation show all
Defined in:
lib/uniword/word_implementation_linux.rb

Instance Method Summary collapse

Methods inherited from WordImplementation

#available_color_schemes, #available_font_schemes, #available_stylesets, #available_themes, detect

Instance Method Details

#cache_pathObject



33
34
35
36
37
38
39
40
# File 'lib/uniword/word_implementation_linux.rb', line 33

def cache_path
  # XDG cache directory
  if ENV["XDG_CACHE_HOME"]
    File.join(ENV["XDG_CACHE_HOME"], "uniword")
  else
    File.expand_path("~/.cache/uniword")
  end
end

#color_schemes_pathObject



25
26
27
# File 'lib/uniword/word_implementation_linux.rb', line 25

def color_schemes_path
  ENV["UNIWORD_COLOR_SCHEMES_PATH"] || File.expand_path("~/.local/share/uniword/color_schemes/source")
end

#font_schemes_pathObject



29
30
31
# File 'lib/uniword/word_implementation_linux.rb', line 29

def font_schemes_path
  ENV["UNIWORD_FONT_SCHEMES_PATH"] || File.expand_path("~/.local/share/uniword/font_schemes/source")
end

#installed?Boolean

NOTE: There is no Microsoft Word for Linux Linux users must manually copy theme files from another system

Returns:

  • (Boolean)


8
9
10
# File 'lib/uniword/word_implementation_linux.rb', line 8

def installed?
  false # No native Word on Linux
end

#stylesets_pathObject



21
22
23
# File 'lib/uniword/word_implementation_linux.rb', line 21

def stylesets_path
  ENV["UNIWORD_STYLESETS_PATH"] || File.expand_path("~/.local/share/uniword/stylesets/source")
end

#themes_pathObject



16
17
18
19
# File 'lib/uniword/word_implementation_linux.rb', line 16

def themes_path
  # User-configured path for manually copied themes
  ENV["UNIWORD_THEMES_PATH"] || File.expand_path("~/.local/share/uniword/themes/source")
end

#versionObject



12
13
14
# File 'lib/uniword/word_implementation_linux.rb', line 12

def version
  nil
end