class NetAtlas::Plugin::Base
Constants
- SEVERITIES
Public Class Methods
arguments()
click to toggle source
# File lib/netatlas/plugin/base.rb, line 41 def arguments self.plugin_args end
plugin_arguments(&block)
click to toggle source
voodoo
# File lib/netatlas/plugin/base.rb, line 16 def plugin_arguments &block def (self.plugin_args).method_missing(meth, *args) meth = meth.to_s.gsub("=",'').to_sym return self[meth] unless args arg = args.first self[meth] = if arg.kind_of? Class case arg.to_s when 'Integer', 'String' {:type => arg, :default => nil} end else case arg when true, false {:type => 'Boolean', :default => arg} when Integer, String {:type => arg.class, :default => arg} when Array {:type => arg.class, :options => arg} end end end self.plugin_args.instance_eval(&block) end
Public Instance Methods
poll()
click to toggle source
# File lib/netatlas/plugin/base.rb, line 47 def poll raise "Must override this method" end