module Ohai::NamedPlugin

For plugin namespacing

Public Class Methods

strict_const_defined?(const) click to toggle source

@return [Boolean]

# File lib/ohai/dsl/plugin.rb, line 43
def self.strict_const_defined?(const)
  const_defined?(const, false)
end
valid_name?(name) click to toggle source

Is the plugin a Symbol starting with a capital letter that has no underscores

@param name [String] the plugin name @return [Boolean]

# File lib/ohai/dsl/plugin.rb, line 38
def self.valid_name?(name)
  name.is_a?(Symbol) && name.to_s.match(/^[^A-Z]|_/).nil?
end