Module: Chordate
- Defined in:
- lib/chordate-ruby/http.rb,
lib/chordate-ruby/error.rb,
lib/chordate-ruby/config.rb,
lib/chordate-ruby/version.rb,
lib/chordate-ruby/chordate.rb,
lib/chordate-ruby/runner/event.rb
Defined Under Namespace
Modules: Runner, Version
Classes: Config, Error, HTTP
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
13
14
15
|
# File 'lib/chordate-ruby/chordate.rb', line 13
def config
@config
end
|
7
8
9
10
11
|
# File 'lib/chordate-ruby/chordate.rb', line 7
def configure
(@config ||= Chordate::Config.new).tap do |config|
yield config
end
end
|
.error(*args) ⇒ Object
31
32
33
34
35
|
# File 'lib/chordate-ruby/chordate.rb', line 31
def error(*args)
@event_runner.async.push(
Chordate::Error.new(*args).as_json
)
end
|
.run! ⇒ Object
17
18
19
20
21
22
23
24
25
|
# File 'lib/chordate-ruby/chordate.rb', line 17
def run!
unless running?
(@event_runner ||= Runner::Event.new).tap do |runner|
runner.start
end
@running = true
end
end
|
.running? ⇒ Boolean
27
28
29
|
# File 'lib/chordate-ruby/chordate.rb', line 27
def running?
!!@running
end
|