mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-20 13:50:45 +00:00
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.
27 lines
557 B
Ruby
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 |