Files
SecGen/lib/objects/local_paragraph_generator.rb
thomashaw 32091ed0fe Special Character work + generator/encoder superclass refactor.
The full Vagrantfile facter string has been encoded in b64 for now, would be nice to b64 the individual arguments rather than the whole string.
2017-03-01 19:19:54 +00:00

27 lines
557 B
Ruby

#!/usr/bin/ruby
require_relative 'local_string_encoder.rb'
class ParagraphGenerator < StringEncoder
attr_accessor :paragraph_count
def initialize
super
self.module_name = 'Paragraph Generator'
self.paragraph_count = ''
end
def get_options_array
super + [['--paragraph_count', GetoptLong::REQUIRED_ARGUMENT]]
end
def process_options(opt, arg)
super
if opt == '--paragraph_count'
self.paragraph_count << arg;
end
end
def encoding_print_string
'paragraph_count: ' + self.paragraph_count.to_s
end
end