Module: Io::AssetAudit::ApiIoSupport

Included in:
AssetAudit
Defined in:
app/api/io/asset_audit.rb

Overview

This module adds the behaviour we require from the AssetAudit module.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


5
6
7
8
9
10
# File 'app/api/io/asset_audit.rb', line 5

def self.included(base)
  base.class_eval do
    # TODO: add any named scopes
    # TODO: add any associations
  end
end

Instance Method Details

#asset_uuidObject


12
13
14
# File 'app/api/io/asset_audit.rb', line 12

def asset_uuid
  asset.try(:uuid)
end

#asset_uuid=(uuid) ⇒ Object


16
17
18
# File 'app/api/io/asset_audit.rb', line 16

def asset_uuid=(uuid)
  self.asset = Uuid.with_external_id(uuid).include_resource.map(&:resource).first
end