class Noteman::Note
Attributes
body[RW]
content[RW]
file[RW]
metadata[RW]
Public Class Methods
new(file)
click to toggle source
# File lib/noteman/note.rb, line 6 def initialize(file) @file = file @content = File.read file @metadata = get_metadata @content @body = remove_metadata @content end
Public Instance Methods
contains?(keywords)
click to toggle source
# File lib/noteman/note.rb, line 30 def contains?(keywords) keywords.all? { |word| body.downcase.include? word.downcase } end
view()
click to toggle source
# File lib/noteman/note.rb, line 34 def view system("open -a \"#{config['view_with']}\" #{file}") end