Module: Ohai::NamedPlugin
- Defined in:
- lib/ohai/dsl/plugin.rb
Overview
For plugin namespacing
Class Method Summary collapse
- .strict_const_defined?(const) ⇒ Boolean
-
.valid_name?(name) ⇒ Boolean
Is the plugin a Symbol starting with a capital letter that has no underscores.
Class Method Details
.strict_const_defined?(const) ⇒ Boolean
43 44 45 |
# File 'lib/ohai/dsl/plugin.rb', line 43 def self.strict_const_defined?(const) const_defined?(const, false) end |
.valid_name?(name) ⇒ Boolean
Is the plugin a Symbol starting with a capital letter that has no underscores
38 39 40 |
# 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 |