Module: Vos::Box::Marks
- Included in:
- Vos::Box
- Defined in:
- lib/vos/box/marks.rb
Instance Method Summary collapse
- #clear_marks! ⇒ Object
- #has_mark?(key) ⇒ Boolean (also: #marked?)
- #mark!(key) ⇒ Object
- #marks_dir ⇒ Object
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?
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_dir ⇒ Object
19 20 21 |
# File 'lib/vos/box/marks.rb', line 19 def marks_dir dir "/marks" end |