Class: ContentfulMigrations::MigrationContentType
- Inherits:
-
Object
- Object
- ContentfulMigrations::MigrationContentType
- Defined in:
- lib/contentful_migrations/migration_content_type.rb
Constant Summary collapse
- DEFAULT_MIGRATION_CONTENT_TYPE =
'migrations'.freeze
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#migration_content_type_name ⇒ Object
readonly
Returns the value of attribute migration_content_type_name.
-
#space ⇒ Object
readonly
Returns the value of attribute space.
-
#space_id ⇒ Object
readonly
Returns the value of attribute space_id.
Instance Method Summary collapse
-
#initialize(client:, space:, logger:, migration_content_type_name: DEFAULT_MIGRATION_CONTENT_TYPE) ⇒ MigrationContentType
constructor
A new instance of MigrationContentType.
- #resolve ⇒ Object
Constructor Details
#initialize(client:, space:, logger:, migration_content_type_name: DEFAULT_MIGRATION_CONTENT_TYPE) ⇒ MigrationContentType
Returns a new instance of MigrationContentType.
8 9 10 11 12 13 14 15 16 |
# File 'lib/contentful_migrations/migration_content_type.rb', line 8 def initialize(client:, space:, logger:, migration_content_type_name: DEFAULT_MIGRATION_CONTENT_TYPE) @client = client @space = space @logger = logger @migration_content_type_name = migration_content_type_name end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
5 6 7 |
# File 'lib/contentful_migrations/migration_content_type.rb', line 5 def access_token @access_token end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/contentful_migrations/migration_content_type.rb', line 5 def client @client end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
5 6 7 |
# File 'lib/contentful_migrations/migration_content_type.rb', line 5 def logger @logger end |
#migration_content_type_name ⇒ Object (readonly)
Returns the value of attribute migration_content_type_name.
5 6 7 |
# File 'lib/contentful_migrations/migration_content_type.rb', line 5 def migration_content_type_name @migration_content_type_name end |
#space ⇒ Object (readonly)
Returns the value of attribute space.
5 6 7 |
# File 'lib/contentful_migrations/migration_content_type.rb', line 5 def space @space end |
#space_id ⇒ Object (readonly)
Returns the value of attribute space_id.
5 6 7 |
# File 'lib/contentful_migrations/migration_content_type.rb', line 5 def space_id @space_id end |
Instance Method Details
#resolve ⇒ Object
18 19 20 |
# File 'lib/contentful_migrations/migration_content_type.rb', line 18 def resolve @migration_content_type ||= find_or_create_migration_content_type end |