Sha256: 196982ed8c3e919efada5edb1dcca0532c00a6368bb5d5f3aba403760b0fcc69
Contents?: true
Size: 434 Bytes
Versions: 18
Compression:
Stored size: 434 Bytes
Contents
# frozen_string_literal: true require "core" require "ghub" module Pennyworth module Loaders # Loads an array projects from the GitHub API. class GitHub def initialize endpoint: Ghub::Endpoints::Repositories::Root.new @endpoint = endpoint end def call(path) = endpoint.index(*path.split("/")).value_or(Core::EMPTY_ARRAY).map(&:to_h) private attr_reader :endpoint end end end
Version data entries
18 entries across 18 versions & 1 rubygems