Class: Alexandria::WebTheme

Inherits:
Object
  • Object
show all
Defined in:
lib/alexandria/web_themes.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#css_fileObject (readonly)

Returns the value of attribute css_file.



23
24
25
# File 'lib/alexandria/web_themes.rb', line 23

def css_file
  @css_file
end

#nameObject (readonly)

Returns the value of attribute name.



23
24
25
# File 'lib/alexandria/web_themes.rb', line 23

def name
  @name
end

#pixmaps_directoryObject (readonly)

Returns the value of attribute pixmaps_directory.



23
24
25
# File 'lib/alexandria/web_themes.rb', line 23

def pixmaps_directory
  @pixmaps_directory
end

#preview_fileObject (readonly)

Returns the value of attribute preview_file.



23
24
25
# File 'lib/alexandria/web_themes.rb', line 23

def preview_file
  @preview_file
end

Class Method Details

.allObject



25
26
27
28
29
30
31
32
33
34
# File 'lib/alexandria/web_themes.rb', line 25

def self.all
  themes_dir = [
    # System dir
    File.join(Alexandria::Config::DATA_DIR, 'web-themes'),

    # User dir
    File.join(ENV['HOME'], '.alexandria', '.web-themes')
  ]
  themes_dir.map { |x| load(x) }.flatten
end

Instance Method Details

#has_pixmaps?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/alexandria/web_themes.rb', line 36

def has_pixmaps?
  File.exist?(@pixmaps_directory)
end