Class: EPUB::Search::Database::Actor

Inherits:
Object
  • Object
show all
Includes:
Celluloid
Defined in:
lib/epub/search/database/actor.rb

Instance Method Summary collapse

Constructor Details

#initialize(db) ⇒ Actor

Returns a new instance of Actor.



7
8
9
# File 'lib/epub/search/database/actor.rb', line 7

def initialize(db)
  @db = db
end

Instance Method Details

#add(file_path) ⇒ Object



11
12
13
# File 'lib/epub/search/database/actor.rb', line 11

def add(file_path)
  @db.add file_path
end

#remove(file_path) ⇒ Object



15
16
17
# File 'lib/epub/search/database/actor.rb', line 15

def remove(file_path)
  @db.remove file_path
end

#update(file_path) ⇒ Object



19
20
21
22
# File 'lib/epub/search/database/actor.rb', line 19

def update(file_path)
  @db.remove file_path
  @db.add file_path
end