Module: Doing::WWID::WWIDUtil

Included in:
Doing::WWID
Defined in:
lib/doing/wwid/wwidutil.rb

Overview

Util methods for WWID class

Instance Method Summary collapse

Instance Method Details

#changesHash

Return a hash of changes between initial file read and current Items object

Returns:

  • (Hash)

    Hash containing added and removed keys with arrays of Item

#configure(filename = nil) ⇒ Object

Load configuration files and updated the @settings attribute with a Doing::Configuration object

Parameters:

  • filename (String) (defaults to: nil)

    (optional) path to alternative config file

#dedup(items, no_overlap: false) ⇒ Object

Remove items from an array that already exist in

Parameters:

  • items (Array)

    The items to deduplicate

  • no_overlap (Boolean) (defaults to: false)

    Remove items with overlapping time spans

#get_diff(filename = nil) ⇒ Object

Get difference between current content and last backup

Parameters:

  • filename (String) (defaults to: nil)

    The file path

Raises:

  • (DoingRuntimeError)

#import(paths, opt) ⇒ Object

Imports external entries

Parameters:

  • paths (String)

    Path to JSON report file

  • opt (Hash)

    Additional Options