Sha256: d6a7c21777928a80dad360e27ab79c26320e213464b6107147c834f327adde14
Contents?: true
Size: 774 Bytes
Versions: 8
Compression:
Stored size: 774 Bytes
Contents
class Card class Migration class Import class ImportData # handles card content for import module CardContent def card_content data File.read(content_path(data)) end def content_changed? data Time.parse(data[:merged]) < File.mtime(content_path(data)) end private def write_card_content data, content FileUtils.mkpath @card_content_dir unless Dir.exist? @card_content_dir File.write content_path(data), content.to_s end def content_path data filename = (data[:key] || data[:name]).to_name.safe_key File.join @card_content_dir, filename end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems