module Gotit::Reader

Public Instance Methods

initialize_reader() click to toggle source
# File lib/gotit/base.rb, line 9
def initialize_reader
  Gotit::Mark.readables.each do |readable|
    mark = Gotit::Mark.find_by(readable: readable, reader: self)
    if mark
      Gotit::Mark.update(timestamp: time.now)
    else
      Gotit::Mark.create(timestamp: time.now, reader: self, readable: readable)
    end
  end
end