class Rookout::Processor::Namespaces::RubyUtilsNamespace
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/rookout/processor/namespaces/ruby_utils_namespace.rb, line 12 def initialize super end
Public Instance Methods
call_method(name, args)
click to toggle source
Calls superclass method
Rookout::Processor::Namespaces::Namespace#call_method
# File lib/rookout/processor/namespaces/ruby_utils_namespace.rb, line 16 def call_method name, args case name when "exception" RubyObjectNamespace.new $ERROR_INFO when "module" find_module args when "env" raise Exceptions::RookKeyNotFound, args unless ENV.include? args RubyObjectNamespace.new ENV[args] when "thread_id" RubyObjectNamespace.new Thread.current.__id__ when "thread_name" RubyObjectNamespace.new Thread.current.name when "threads" RubyObjectNamespace.new Thread.list when "thread_tracebacks" thread_tracebacks else super end end
read_attribute(_name)
click to toggle source
# File lib/rookout/processor/namespaces/ruby_utils_namespace.rb, line 38 def read_attribute _name RubyObjectNamespace.new nil end
read_key(_key)
click to toggle source
# File lib/rookout/processor/namespaces/ruby_utils_namespace.rb, line 42 def read_key _key RubyObjectNamespace.new nil end
Private Instance Methods
find_module(args)
click to toggle source
# File lib/rookout/processor/namespaces/ruby_utils_namespace.rb, line 48 def find_module args RubyObjectNamespace.new Object.const_get(args) rescue NameError raise Exceptions::RookKeyNotFound, args end
thread_tracebacks()
click to toggle source
# File lib/rookout/processor/namespaces/ruby_utils_namespace.rb, line 54 def thread_tracebacks result = Thread.list.map do |thread| { id: thread.__id__, name: thread.name, traceback: thread.backtrace } end RubyObjectNamespace.new result end