Module: Card::Migration::Import::ImportData::CardContent

Included in:
Card::Migration::Import::ImportData
Defined in:
lib/card/migration/import/import_data/card_content.rb

Overview

handles card content for import

Instance Method Summary collapse

Instance Method Details

#card_content(data) ⇒ Object



7
8
9
# File 'lib/card/migration/import/import_data/card_content.rb', line 7

def card_content data
  File.read(content_path(data))
end

#content_changed?(data) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/card/migration/import/import_data/card_content.rb', line 11

def content_changed? data
  Time.parse(data[:merged]) < File.mtime(content_path(data))
end