Module: CompositionUtilsBooleanAndStats
- Included in:
- CompositionUtils
- Defined in:
- lib/au_ps_inferno/utils/composition_utils/boolean_and_stats.rb
Overview
Bundle-level booleans and per-path statistics lines for CompositionUtils.
Instance Method Summary collapse
- #all_entries_have_full_url_info? ⇒ Boolean
- #boolean_to_existent_string(boolean_value, optional: false) ⇒ Object
- #identifier_info? ⇒ Boolean
- #timestamp_info? ⇒ Boolean
- #type_info? ⇒ Boolean
Instance Method Details
#all_entries_have_full_url_info? ⇒ Boolean
10 11 12 13 14 15 |
# File 'lib/au_ps_inferno/utils/composition_utils/boolean_and_stats.rb', line 10 def all_entries_have_full_url_info? entry_full_url_count = resolve_path_with_dar(scratch_bundle, 'entry.fullUrl').length entries_count = resolve_path_with_dar(scratch_bundle, 'entry').length entry_full_url_count == entries_count end |
#boolean_to_existent_string(boolean_value, optional: false) ⇒ Object
5 6 7 8 |
# File 'lib/au_ps_inferno/utils/composition_utils/boolean_and_stats.rb', line 5 def boolean_to_existent_string(boolean_value, optional: false) missing_icon = optional ? '⚠️' : '❌' boolean_value ? '✅ Populated' : "#{missing_icon} Missing" end |
#identifier_info? ⇒ Boolean
25 26 27 |
# File 'lib/au_ps_inferno/utils/composition_utils/boolean_and_stats.rb', line 25 def identifier_info? resolve_path_with_dar(scratch_bundle, 'identifier').first.present? end |
#timestamp_info? ⇒ Boolean
17 18 19 |
# File 'lib/au_ps_inferno/utils/composition_utils/boolean_and_stats.rb', line 17 def resolve_path_with_dar(scratch_bundle, 'timestamp').first.present? end |
#type_info? ⇒ Boolean
21 22 23 |
# File 'lib/au_ps_inferno/utils/composition_utils/boolean_and_stats.rb', line 21 def type_info? resolve_path_with_dar(scratch_bundle, 'type').first.present? end |