generators/domain: added default read_fact for name

This commit is contained in:
thomashaw
2017-08-16 19:08:03 +01:00
parent 799d729f2c
commit f9ac37360c
2 changed files with 6 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
require_relative '../../../../lib/objects/local_string_encoder.rb'
require 'faker'
class DomainEncoder < StringEncoder
class DomainGenerator < StringEncoder
attr_accessor :name
def initialize
@@ -43,4 +43,4 @@ class DomainEncoder < StringEncoder
end
end
DomainEncoder.new.run
DomainGenerator.new.run

View File

@@ -20,5 +20,9 @@
<!-- Convert a name into a randomly formatted domain. Works with business names too. e.g. thomas_shaw.org-->
<read_fact>name</read_fact>
<default_input into="name">
<generator type="name_generator"/>
</default_input>
<output_type>domain</output_type>
</generator>