mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-21 11:18:06 +00:00
generators/domain: added default read_fact for name
This commit is contained in:
@@ -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
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user