Class: Cts::Mpx::Entries

Inherits:
Object
  • Object
show all
Defined in:
lib/cts/mpx/aci/extensions/cts/mpx/entries.rb

Overview

extensions to the Cts::Mpx::Collection

Instance Method Summary collapse

Instance Method Details

#fileshash

All entries in the collections.

Returns:

  • (hash)

    of entries with filepath as key and md5 hash as value



8
9
10
11
12
# File 'lib/cts/mpx/aci/extensions/cts/mpx/entries.rb', line 8

def files
  hash = {}
  entries.map { |e| hash.store "#{e.directory}/#{e.filename}", e.hash }
  hash
end

#transform(user) ⇒ Object

transform every entry



15
16
17
18
# File 'lib/cts/mpx/aci/extensions/cts/mpx/entries.rb', line 15

def transform(user)
  each { |entry| entry.transform user }
  nil
end

#untransform(user, target_account) ⇒ Object

untransform every entry

Parameters:

  • target_account (String)

    to transform to



23
24
25
26
# File 'lib/cts/mpx/aci/extensions/cts/mpx/entries.rb', line 23

def untransform(user, )
  each { |entry| entry.untransform(user, ) }
  nil
end