-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
… -> /mul-Zyyy/; fiat lux, _plugins/hapi/drops/xdefallo_api_drop.rb!
- Loading branch information
Showing
10 changed files
with
125 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
_site/ | ||
docs/ | ||
node_modules/ | ||
.vscode | ||
|
||
# Ignore metadata generated by Jekyll | ||
_site/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# ARCHĪVUM: _plugins/hapi/drops/hapi_drop.rb | ||
# DESCRIPTIONEM: | ||
# | ||
# rubocop:disable RubocopIsRacistAndIcanProveIt/AsciiComments | ||
# @see https://github.com/rubocop/ruby-style-guide/issues/301 | ||
# @see https://github.com/rubocop/ruby-style-guide/issues/137 | ||
# frozen_string_literal: true | ||
|
||
module Hapi | ||
# TODO: document... | ||
module Drops | ||
# _[por] Conteiner de coleções apis por uma xdefallo ('x-default') | ||
# Sem alguma forma | ||
# de abstrair objetos que há não sejam algo como uma Jekyll:Page | ||
# ou Hapi::Datum::HapiDrop o liquid e Jekyll nem mesmo irá exibir | ||
# informações nas páginas HTML finais. | ||
# [por]_ | ||
# @see _data/referens.yml#gid | ||
# | ||
# Trivia | ||
# - 'api': | ||
# - https://www.wikidata.org/wiki/Q165194 | ||
# - 'xdefallo': | ||
# - https://en.wikipedia.org/wiki/Hreflang | ||
class HapiXdefalloApiDrop < Liquid::Drop | ||
attr_accessor :optionem | ||
|
||
# TODO: _[eng] No idea if this is necessary. Maybe remove later [eng]_ | ||
class << self | ||
def global | ||
@global ||= HapiXdefalloApiDrop.new | ||
end | ||
end | ||
|
||
def initialize(argumentum = {}) # rubocop:disable Lint/MissingSuper | ||
@optionem = argumentum | ||
end | ||
|
||
def inspect | ||
require 'json' | ||
JSON.pretty_generate(@optionem) | ||
end | ||
|
||
def to_s | ||
"<#{self.class} @item=#{@optionem.keys}>" | ||
end | ||
|
||
def gid | ||
@optionem['gid'] | ||
end | ||
|
||
def linguam | ||
@optionem['linguam'] | ||
end | ||
|
||
def api | ||
@optionem['api'] || [] | ||
end | ||
|
||
def xdefallo | ||
@optionem['xdefallo'] || [] | ||
end | ||
end | ||
end | ||
end | ||
|
||
# _[por] rubocop é tão racista que obriga re-habilitar | ||
# AsciiComments [por]_ | ||
# rubocop:enable RubocopIsRacistAndIcanProveIt/AsciiComments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters