Class: Contentful::DatabaseImporter::Config
- Inherits:
-
Object
- Object
- Contentful::DatabaseImporter::Config
- Defined in:
- lib/contentful/database_importer/config.rb
Overview
Configuration for Importer
Instance Attribute Summary collapse
-
#database_connection ⇒ Object
Returns the value of attribute database_connection.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#locale ⇒ Object
Returns the value of attribute locale.
-
#skip_content_types ⇒ Object
Returns the value of attribute skip_content_types.
-
#space_id ⇒ Object
Returns the value of attribute space_id.
-
#space_name ⇒ Object
Returns the value of attribute space_name.
Instance Method Summary collapse
- #complete? ⇒ Boolean
- #complete_for_run? ⇒ Boolean
- #complete_for_update? ⇒ Boolean
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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_connection ⇒ Object
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 |
#environment ⇒ Object
Returns the value of attribute environment.
5 6 7 |
# File 'lib/contentful/database_importer/config.rb', line 5 def environment @environment end |
#locale ⇒ Object
Returns the value of attribute locale.
5 6 7 |
# File 'lib/contentful/database_importer/config.rb', line 5 def locale @locale end |
#skip_content_types ⇒ Object
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_id ⇒ Object
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_name ⇒ Object
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
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
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
22 23 24 |
# File 'lib/contentful/database_importer/config.rb', line 22 def complete_for_update? !space_id.nil? && !database_connection.nil? end |