Module: AUPSTestKit::BasicTestAuthorResource
- Included in:
- BasicTestAuthorModule
- Defined in:
- lib/au_ps_inferno/utils/author/basic_test_author_resource.rb
Overview
Resolves Composition.author reference from the scratch bundle.
Instance Method Summary collapse
Instance Method Details
#author_resource ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/au_ps_inferno/utils/author/basic_test_author_resource.rb', line 8 def return nil unless scratch_bundle.present? bundle_resource = BundleDecorator.new(scratch_bundle) composition_resource = bundle_resource.composition_resource return nil unless composition_resource.present? = (composition_resource) return nil unless .present? ref_str = .respond_to?(:reference) ? .reference : ['reference'] return nil if ref_str.blank? bundle_resource.resource_by_reference(ref_str) end |