Class: Contentful::Exporter::Drupal::FileManaged

Inherits:
Object
  • Object
show all
Defined in:
lib/drupal/file_managed.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#configObject (readonly)

Returns the value of attribute config.



6
7
8
# File 'lib/drupal/file_managed.rb', line 6

def config
  @config
end

#exporterObject (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_jsonObject



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