class Ulysses::Library
Constants
- DEFAULT_LIBRARY_DIR
Attributes
dirname[R]
Public Class Methods
new(dirname = nil)
click to toggle source
# File lib/ulysses/library.rb, line 8 def initialize(dirname = nil) @dirname = File.expand_path(dirname ||= DEFAULT_LIBRARY_DIR) end
Public Instance Methods
groups()
click to toggle source
# File lib/ulysses/library.rb, line 12 def groups @groups ||= parse_groups end
reload()
click to toggle source
# File lib/ulysses/library.rb, line 16 def reload @groups = nil end
Private Instance Methods
parse_groups()
click to toggle source
# File lib/ulysses/library.rb, line 22 def parse_groups Dir.glob(File.join @dirname, 'Groups-ulgroup', '*.ulgroup').map do |info_file| Group.new info_file end end