Class: Hyrax::RequiredDataSeeder
- Inherits:
-
Object
- Object
- Hyrax::RequiredDataSeeder
- Defined in:
- app/utils/hyrax/required_data_seeder.rb
Overview
This class was created for use in rake tasks and db/seeds.rb. It generates required repository metadata including Admin Set and User collection types and the default admin set.
Seeders of required data are non-destructive. If the data already exists, it will not be replaced.
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
- #generate_seed_data ⇒ Object
-
#initialize(logger: Logger.new(STDOUT)) ⇒ RequiredDataSeeder
constructor
A new instance of RequiredDataSeeder.
Constructor Details
#initialize(logger: Logger.new(STDOUT)) ⇒ RequiredDataSeeder
Returns a new instance of RequiredDataSeeder.
12 13 14 |
# File 'app/utils/hyrax/required_data_seeder.rb', line 12 def initialize(logger: Logger.new(STDOUT)) @logger = logger end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
10 11 12 |
# File 'app/utils/hyrax/required_data_seeder.rb', line 10 def logger @logger end |
Instance Method Details
#generate_seed_data ⇒ Object
16 17 18 19 |
# File 'app/utils/hyrax/required_data_seeder.rb', line 16 def generate_seed_data Hyrax::RequiredDataSeeders::CollectionTypeSeeder.generate_seeds(logger: logger) Hyrax::RequiredDataSeeders::CollectionSeeder.generate_seeds(logger: logger) end |