Module: Vos::Box::Marks

Included in:
Vos::Box
Defined in:
lib/vos/box/marks.rb

Instance Method Summary collapse

Instance Method Details

#clear_marks!Object



14
15
16
17
# File 'lib/vos/box/marks.rb', line 14

def clear_marks!
  marks_dir.destroy
  @marks_cache = nil
end

#has_mark?(key) ⇒ Boolean Also known as: marked?

Returns:

  • (Boolean)


9
10
11
# File 'lib/vos/box/marks.rb', line 9

def has_mark? key
  marks_cache.include? key.to_s
end

#mark!(key) ⇒ Object



4
5
6
7
# File 'lib/vos/box/marks.rb', line 4

def mark! key
  marks_dir.file(key).create
  @marks_cache = nil
end

#marks_dirObject



19
20
21
# File 'lib/vos/box/marks.rb', line 19

def marks_dir
  dir "/marks"
end