Class: Sys::Proc::Helper

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/sys/proc/helper.rb

Overview

Provides access to helper classes

Defined Under Namespace

Classes: Inflector, LibC, System

Instance Method Summary collapse

Instance Method Details

#get(name) ⇒ Object

Parameters:

  • name (String|Symbol)

Returns:

  • (Object)

Raises:

  • (NotImplementedError)


31
32
33
34
35
36
37
38
39
40
41
# File 'lib/sys/proc/helper.rb', line 31

def get(name)
  name = name.to_sym

  return items[name] if items[name]

  begin
    @items[name] = inflector.resolve("sys/proc/helper/#{name}").new
  rescue LoadError
    raise NotImplementedError, "helper not loadable: #{name}"
  end
end