Module: Wpxf::Db::Loot

Included in:
Helpers::Export, WordPress::FileDownload
Defined in:
lib/wpxf/db/loot.rb

Overview

Provides functionality for storing loot items.

Instance Method Summary collapse

Instance Method Details

#store_loot(path, notes = '', type = 'unknown') ⇒ Models::LootItem

Store a path to a new loot item in the database.

Parameters:

  • path (String)

    the path to the stored loot.

  • type (String) (defaults to: 'unknown')

    the type of loot acquired.

Returns:



9
10
11
12
13
14
15
16
17
18
# File 'lib/wpxf/db/loot.rb', line 9

def store_loot(path, notes = '', type = 'unknown')
  Wpxf::Models::LootItem.create(
    host: target_host,
    port: target_port,
    path: path,
    notes: notes,
    type: type,
    workspace: active_workspace
  )
end