Class: Sys::Proc::Helper::System::Generic
- Inherits:
-
Object
- Object
- Sys::Proc::Helper::System::Generic
show all
- Defined in:
- lib/sys/proc/helper/system/generic.rb
Overview
Provides access to Sys::Proc::Concerns::System::Generic methods
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/sys/proc/helper/system/generic.rb', line 13
def method_missing(method, *args, &block)
if respond_to_missing?(method)
system.public_send(method, *args, &block)
else
super
end
end
|
Instance Method Details
#respond_to_missing?(method, include_private = false) ⇒ Boolean
21
22
23
24
25
|
# File 'lib/sys/proc/helper/system/generic.rb', line 21
def respond_to_missing?(method, include_private = false)
return true if system.respond_to?(method, include_private)
super(method, include_private)
end
|
#setprogname(progname = nil, &block) ⇒ String
28
29
30
31
32
|
# File 'lib/sys/proc/helper/system/generic.rb', line 28
def setprogname(progname = nil, &block)
system.progname = progname || system.default_progname
system.progname = yield(system) if block
end
|