class Contentful::Importer::ImportModel

Public Class Methods

import(settings, converter, importer) click to toggle source
# File lib/contentful/importer/import_model.rb, line 15
def self.import(settings, converter, importer)
        if settings['content_model_json']
                converter.convert_to_import_form
                converter.create_content_type_json
        end

        importer.create_contentful_model(settings)
end
options() click to toggle source
Calls superclass method Contentful::Importer::Command::options
# File lib/contentful/importer/import_model.rb, line 9
def self.options
        [['--content_model_json=model.json',
                'Content model to use for import. Uses the data directory by default.']
                ].concat(super).concat(data_options).concat(space_options).sort
end

Public Instance Methods

run() click to toggle source
Calls superclass method Contentful::Importer::Command#run
# File lib/contentful/importer/import_model.rb, line 24
def run
        super
        self.class.import(@settings, @converter, @importer)
end