diff --git a/_plugins/hapi/drops/hapi_drop.rb b/_plugins/hapi/drops/hapi_drop.rb index 8db6b9e..b65277b 100644 --- a/_plugins/hapi/drops/hapi_drop.rb +++ b/_plugins/hapi/drops/hapi_drop.rb @@ -31,17 +31,35 @@ def initialize(argumentum = {}) # rubocop:disable Lint/MissingSuper @optionem = argumentum end + # _[eng] List of all APIs, no special sorting or selection [eng]_ + # + # @see _plugins/jekyll_hapi_api.rb def api @optionem['api'] end + # _[eng] List of all x-default APIs [eng]_ + # + # @see _plugins/hapi/drops/xdefallo_api_drop.rb def xapi @optionem['xapi'] end + + # _[eng] List of APIs & Schemas per Region [eng]_ + # + # @see _plugins/hapi/drops/globum_drop.rb + def globum + @optionem['globum'] + end + # def api_xdefallo # @optionem['api_xdefallo'] # end + # _[eng] Generic list of Jekyll Pages, APIs, Schemas by category. + # Warning: this is a draft and may not be used. Consider this a + # draft. + # [eng]_ def categoriam @optionem['categoriam'] end @@ -75,13 +93,20 @@ def to_s "<{#{self.class} @item=[#{optionem_explanandum.join(', ')}]}>" end + # TODO: abstract scheman def scheman @optionem['scheman'] end + + # TODO: abstract xscheman def xscheman @optionem['xscheman'] end + # _[eng] Generic list of Jekyll Pages, APIs, Schemas by tag. + # Warning: this is a draft and may not be used. Consider this a + # draft. + # [eng]_ def pittacium @optionem['pittacium'] end diff --git a/_plugins/hapi/hic_sunt_dracones.rb b/_plugins/hapi/hic_sunt_dracones.rb index de889b0..4535774 100644 --- a/_plugins/hapi/hic_sunt_dracones.rb +++ b/_plugins/hapi/hic_sunt_dracones.rb @@ -60,13 +60,14 @@ def initiale_pre_render # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, next if page['categories'].nil? page['categories'].each do |cat| - pittacium[cat] = [] if pittacium[cat].nil? - pittacium[cat].append(page) + categoriam[cat] = [] if categoriam[cat].nil? + categoriam[cat].append(page) end end # api_xdefallo = api_xdefallo?(api) api_gid_xdefallo = api_gid_xdefallo?(api) + globum = globum_api_et_scheman?(api) jekyll_data = HSD.data? @@ -74,10 +75,11 @@ def initiale_pre_render # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, { 'api' => api, # 'api_xdefallo' => api_xdefallo, - 'api_gid_xdefallo' => api_gid_xdefallo, - 'globum' => api_gid_xdefallo, + 'xapi' => api_gid_xdefallo, + 'globum' => globum, 'categoriam' => categoriam, 'scheman' => { 'TODO' => '_[eng] To be implemented also here [eng]_' }, + 'xscheman' => { 'TODO' => '_[eng] To be implemented also here [eng]_' }, 'pittacium' => pittacium } ) @@ -97,9 +99,9 @@ def api!(api) Jekyll.sites[idx].data['api'] = api end - def api_gid_xdefallo?(api_collectionem = nil, referens_gid = nil) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity + def api_gid_xdefallo?(api_collectionem = nil) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity apis = api_collectionem || api? - referens_gid ||= referens_gid? + referens_gid = referens_gid? # puts 'oi oi ' # puts referens_gid.empty? @@ -124,16 +126,6 @@ def api_gid_xdefallo?(api_collectionem = nil, referens_gid = nil) # rubocop:disa resultatum.append(drop) end - # apis&.each do |api| - # resultatum.append(api) if api.xdefallo_est? - # # resultatum[clavem] = valendum - # end - - # TODO: order by UN, XZ, then others - - # puts 'resultatum' - # puts resultatum - resultatum end @@ -162,6 +154,16 @@ def data!(data) Jekyll.sites[idx].data = data end + # _[eng] Not implemented yet with this strategy [eng]_ + def schemam? + [] + end + + # _[eng] Not implemented yet with this strategy [eng]_ + def xschemam? + [] + end + def site? Jekyll.sites.last end @@ -198,6 +200,12 @@ def globum? # rubocop:disable Metrics/AbcSize Jekyll.sites.last.data['l10n']['referensl10n']['gid'] end + def globum_api_et_scheman?(api_collectionem = nil, _schemam_collectionem = nil) + apis = api_collectionem || api? + + api_gid_xdefallo?(api_collectionem) + end + def testum # puts 'okay' # puts 'Hapi.HSD.site?.inspect'