Class: Contentful::DatabaseImporter::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/contentful/database_importer/config.rb

Overview

Configuration for Importer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



12
13
14
15
16
# File 'lib/contentful/database_importer/config.rb', line 12

def initialize
  @environment = 'master'
  @skip_content_types = true
  @locale = 'en-US'
end

Instance Attribute Details

#database_connectionObject

Returns the value of attribute database_connection.



5
6
7
# File 'lib/contentful/database_importer/config.rb', line 5

def database_connection
  @database_connection
end

#environmentObject

Returns the value of attribute environment.



5
6
7
# File 'lib/contentful/database_importer/config.rb', line 5

def environment
  @environment
end

#localeObject

Returns the value of attribute locale.



5
6
7
# File 'lib/contentful/database_importer/config.rb', line 5

def locale
  @locale
end

#skip_content_typesObject

Returns the value of attribute skip_content_types.



5
6
7
# File 'lib/contentful/database_importer/config.rb', line 5

def skip_content_types
  @skip_content_types
end

#space_idObject

Returns the value of attribute space_id.



5
6
7
# File 'lib/contentful/database_importer/config.rb', line 5

def space_id
  @space_id
end

#space_nameObject

Returns the value of attribute space_name.



5
6
7
# File 'lib/contentful/database_importer/config.rb', line 5

def space_name
  @space_name
end

Instance Method Details

#complete?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/contentful/database_importer/config.rb', line 26

def complete?
  complete_for_run? || complete_for_update?
end

#complete_for_run?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/contentful/database_importer/config.rb', line 18

def complete_for_run?
  !space_name.nil? && !database_connection.nil?
end

#complete_for_update?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/contentful/database_importer/config.rb', line 22

def complete_for_update?
  !space_id.nil? && !database_connection.nil?
end