Class: Ulysses::Library

Inherits:
Object
  • Object
show all
Defined in:
lib/ulysses/library.rb

Constant Summary collapse

DEFAULT_LIBRARY_DIR =
'~/Library/Mobile Documents/X5AZV975AG~com~soulmen~ulysses3/Documents/Library'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dirname = nil) ⇒ Library

Returns a new instance of Library.



8
9
10
# File 'lib/ulysses/library.rb', line 8

def initialize(dirname = nil)
  @dirname = File.expand_path(dirname ||= DEFAULT_LIBRARY_DIR)
end

Instance Attribute Details

#dirnameObject (readonly)

Returns the value of attribute dirname.



6
7
8
# File 'lib/ulysses/library.rb', line 6

def dirname
  @dirname
end

Instance Method Details

#groupsObject



12
13
14
# File 'lib/ulysses/library.rb', line 12

def groups
  @groups ||= parse_groups
end

#reloadObject



16
17
18
# File 'lib/ulysses/library.rb', line 16

def reload
  @groups = nil
end