Class: Germinator::SeedConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/germinator/seed_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSeedConfig

Returns a new instance of SeedConfig.



6
7
8
9
10
11
# File 'lib/germinator/seed_config.rb', line 6

def initialize
  @stop_on_error = false
  @stop_on_invalid_model = false
  @environments = true
  @valid_models = true
end

Instance Attribute Details

#environmentsObject

Returns the value of attribute environments.



4
5
6
# File 'lib/germinator/seed_config.rb', line 4

def environments
  @environments
end

#stop_on_errorObject

Returns the value of attribute stop_on_error.



4
5
6
# File 'lib/germinator/seed_config.rb', line 4

def stop_on_error
  @stop_on_error
end

#stop_on_invalid_modelObject

Returns the value of attribute stop_on_invalid_model.



4
5
6
# File 'lib/germinator/seed_config.rb', line 4

def stop_on_invalid_model
  @stop_on_invalid_model
end

#valid_modelsObject

Returns the value of attribute valid_models.



4
5
6
# File 'lib/germinator/seed_config.rb', line 4

def valid_models
  @valid_models
end

Instance Method Details

#to_hashObject



13
14
15
16
17
18
19
20
# File 'lib/germinator/seed_config.rb', line 13

def to_hash
  {
    stop_on_error: @stop_on_error,
    stop_on_invalid_model: @stop_on_invalid_model,
    environments: @environments,
    valid_models: @valid_models
  }
end