Class: Colonization::ValuesGenerator
- Inherits:
-
Object
- Object
- Colonization::ValuesGenerator
- Defined in:
- lib/colonization/values_generator.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(type, validators, strategy) ⇒ ValuesGenerator
constructor
A new instance of ValuesGenerator.
Constructor Details
#initialize(type, validators, strategy) ⇒ ValuesGenerator
Returns a new instance of ValuesGenerator.
7 8 9 10 |
# File 'lib/colonization/values_generator.rb', line 7 def initialize(type, validators, strategy) init_config(type) set_validations(custom_validators(validators)) end |
Instance Method Details
#call ⇒ Object
12 13 14 15 |
# File 'lib/colonization/values_generator.rb', line 12 def call #@config[:validations].empty? ? generate_faker_value : generate_custom_value generate_faker_value end |