education/classroom

View on GitHub
app/models/github_resource.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

# Parent class to hold id attribute.
# Used for defining GitHub resources that are only dependant on an id.
class GitHubResource < GitHubModel
  attr_reader :id

  # client  - The Octokit::Client making the request.
  # id      - The Interger id for the resource.
  # options - A Hash of options to pass (optional).
  #
  def initialize(client, id, **options)
    super(client, { id: id }, options)
  end

  private

  def github_attributes
    []
  end

  def local_cached_attributes
    []
  end
end