class Cheatly::Adapter::GitHub

Constants

FOLDER
REPO

Public Instance Methods

all() click to toggle source
# File lib/cheatly/adapter/github.rb, line 15
def all
  response = Octokit.contents(REPO, path: "#{FOLDER}")
  response.map { |f| f.name.gsub(/\.[a-z]+\z/, '') }
end
create(name, body) click to toggle source
# File lib/cheatly/adapter/github.rb, line 20
def create(name, body)
  raise NotImplementedError
end
find(path) click to toggle source
# File lib/cheatly/adapter/github.rb, line 10
def find(path)
  response = Octokit.contents(REPO, path: "#{FOLDER}/#{path}.md")
  Base64.decode64(response.content)
end
update(name, body) click to toggle source
# File lib/cheatly/adapter/github.rb, line 24
def update(name, body)
  raise NotImplementedError
end