Module: Nonnative
- Defined in:
- lib/nonnative.rb,
lib/nonnative/error.rb,
lib/nonnative/logger.rb,
lib/nonnative/process.rb,
lib/nonnative/version.rb,
lib/nonnative/configuration.rb
Defined Under Namespace
Classes: Configuration, Error, Logger, Process
Constant Summary
collapse
- VERSION =
'0.5.0'
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
21
22
23
|
# File 'lib/nonnative.rb', line 21
def configuration
@configuration ||= Nonnative::Configuration.new
end
|
25
26
27
|
# File 'lib/nonnative.rb', line 25
def configure
yield configuration if block_given?
end
|
.start ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/nonnative.rb', line 29
def start
@process ||= Nonnative::Process.new(configuration)
result, pid = @process.start
return if result
logger.error('Process has started though did respond in time', pid: pid)
end
|
.stop ⇒ Object
37
38
39
40
41
42
|
# File 'lib/nonnative.rb', line 37
def stop
result, pid = @process.stop
return if result
logger.error('Process has stopped though did respond in time', pid: pid)
end
|