X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=doc%2FMCollective%2FGenerators%2FBase.html;fp=doc%2FMCollective%2FGenerators%2FBase.html;h=9fea03ab6f96afe16353d4f60866ad7a2289338a;hb=7c9314f502cde8daad23b61d10b24a542e04154a;hp=0000000000000000000000000000000000000000;hpb=d1f1649ba43c5cbc43c4beb2380096ba051d646a;p=packages%2Fprecise%2Fmcollective.git diff --git a/doc/MCollective/Generators/Base.html b/doc/MCollective/Generators/Base.html new file mode 100644 index 0000000..9fea03a --- /dev/null +++ b/doc/MCollective/Generators/Base.html @@ -0,0 +1,584 @@ + + + +
+ + +(Not documented)
+ + + ++ # File lib/mcollective/generators/base.rb, line 5 + 5: def initialize(name, description, author, license, version, url, timeout) + 6: @meta = {:name => name, + 7: :description => description, + 8: :author => author, + 9: :license => license, +10: :version => version, +11: :url => url, +12: :timeout => timeout} +13: end+
(Not documented)
+ + + ++ # File lib/mcollective/generators/base.rb, line 15 +15: def create_metadata_string +16: ddl_template = File.read(File.join(File.dirname(__FILE__), "templates", "ddl.erb")) +17: ERB.new(ddl_template, nil, "-").result(binding) +18: end+
(Not documented)
+ + + ++ # File lib/mcollective/generators/base.rb, line 20 +20: def create_plugin_string +21: plugin_template = File.read(File.join(File.dirname(__FILE__), "templates", "plugin.erb")) +22: ERB.new(plugin_template, nil, "-").result(binding) +23: end+
(Not documented)
+ + + ++ # File lib/mcollective/generators/base.rb, line 25 +25: def write_plugins +26: begin +27: Dir.mkdir @plugin_name +28: dirname = File.join(@plugin_name, @mod_name.downcase) +29: Dir.mkdir dirname +30: puts "Created plugin directory : #{@plugin_name}" +31: +32: File.open(File.join(dirname, "#{@plugin_name}.ddl"), "w"){|f| f.puts @ddl} +33: puts "Created DDL file : #{File.join(dirname, "#{@plugin_name}.ddl")}" +34: +35: File.open(File.join(dirname, "#{@plugin_name}.rb"), "w"){|f| f.puts @plugin} +36: puts "Created #{@mod_name} file : #{File.join(dirname, "#{@plugin_name}.rb")}" +37: rescue Errno::EEXIST +38: raise "cannot generate '#{@plugin_name}' : plugin directory already exists." +39: rescue Exception => e +40: FileUtils.rm_rf(@plugin_name) if File.directory?(@plugin_name) +41: raise "cannot generate plugin - #{e}" +42: end +43: end+
Disabled; run with --debug to generate this.
+ +Generated with the Darkfish + Rdoc Generator 1.1.6.
+