Sha256: 088bd85a417ed049a87538bed84acfe16a71e4a5c3a9c0cefdfab629001f4c96
Contents?: true
Size: 760 Bytes
Versions: 95
Compression:
Stored size: 760 Bytes
Contents
module Mumuki::Domain::Store ## This Store enables importing content ## from Bibliotheca API class Bibliotheca < Mumukit::Sync::Store::Base include Mumukit::Sync::Store::WithWrappedLanguage include Mumukit::Sync::Store::WithFilteredId def initialize(bibliotheca_bridge) @bibliotheca_bridge = bibliotheca_bridge end def sync_keys %w(guide topic book).flat_map do |kind| @bibliotheca_bridge .send(kind.as_variable_name.pluralize) .map { |it| Mumukit::Sync.key kind, it['slug'] } end end def do_read(sync_key) @bibliotheca_bridge.send(sync_key.kind.as_variable_name, sync_key.id) end def write_resource!(*) Mumukit::Sync::Store.read_only! end end end
Version data entries
95 entries across 95 versions & 2 rubygems