Class: Fluentspec::Supervisor
- Inherits:
-
Object
- Object
- Fluentspec::Supervisor
- Defined in:
- lib/fluentspec/supervisor.rb
Instance Method Summary collapse
-
#initialize(conf = nil) ⇒ Supervisor
constructor
A new instance of Supervisor.
-
#reset ⇒ Object
rubocop:disable Lint/HandleExceptions.
Constructor Details
#initialize(conf = nil) ⇒ Supervisor
Returns a new instance of Supervisor.
33 34 35 36 37 38 39 40 |
# File 'lib/fluentspec/supervisor.rb', line 33 def initialize(conf = nil) raise ArgumentError if conf.nil? @conf = conf opts = Fluent::Supervisor. opts[:config_path] = @conf @sv = Fluent::Supervisor.new(opts) @sv.run_spec end |
Instance Method Details
#reset ⇒ Object
rubocop:disable Lint/HandleExceptions
43 44 45 46 47 48 |
# File 'lib/fluentspec/supervisor.rb', line 43 def reset opts = Fluent::Supervisor. @sv = Fluent::Supervisor.new(opts) @sv.run_spec rescue end |