Module: Contrast::Api::Decorators::LibraryUsageUpdate::ClassMethods

Defined in:
lib/contrast/api/decorators/library_usage_update.rb

Overview

Used to add class methods to the LibraryUsageUpdate class on inclusion of the decorator

Instance Method Summary collapse

Instance Method Details

#build(digest, files) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/contrast/api/decorators/library_usage_update.rb', line 16

def build digest, files
  msg = new
  msg.hash_code = Contrast::Utils::StringUtils.force_utf8(digest)
  files.each do |required_file|
    msg.class_names[required_file] = true
  end
  msg
end