Class: Contentful::Exporter::Drupal::FileManaged
- Inherits:
-
Object
- Object
- Contentful::Exporter::Drupal::FileManaged
- Defined in:
- lib/drupal/file_managed.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#exporter ⇒ Object
readonly
Returns the value of attribute exporter.
Instance Method Summary collapse
-
#initialize(exporter, config) ⇒ FileManaged
constructor
A new instance of FileManaged.
- #save_files_as_json ⇒ Object
Constructor Details
#initialize(exporter, config) ⇒ FileManaged
8 9 10 |
# File 'lib/drupal/file_managed.rb', line 8 def initialize(exporter, config) @exporter, @config = exporter, config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
6 7 8 |
# File 'lib/drupal/file_managed.rb', line 6 def config @config end |
#exporter ⇒ Object (readonly)
Returns the value of attribute exporter.
6 7 8 |
# File 'lib/drupal/file_managed.rb', line 6 def exporter @exporter end |
Instance Method Details
#save_files_as_json ⇒ Object
12 13 14 15 16 17 |
# File 'lib/drupal/file_managed.rb', line 12 def save_files_as_json exporter.create_directory("#{config.assets_dir}/file") config.db[:file_managed].each do |file_row| extract_data(file_row) end end |