Module: StayAwake
- Defined in:
- lib/stay_awake.rb,
lib/stay_awake/buzzer.rb,
lib/stay_awake/sinatra.rb,
lib/stay_awake/version.rb,
lib/stay_awake/strategy.rb,
lib/stay_awake/configuration.rb,
lib/stay_awake/strategies/httparty.rb,
lib/stay_awake/strategies/net_http.rb,
lib/stay_awake/strategies/em_http_request.rb
Defined Under Namespace
Modules: Sinatra, Strategies, Strategy
Classes: Buzzer, Configuration, ConfigurationError
Constant Summary
collapse
- VERSION =
'0.0.1'
Class Method Summary
collapse
Class Method Details
.buzz ⇒ Object
23
24
25
|
# File 'lib/stay_awake.rb', line 23
def self.buzz
Buzzer.instance.buzz
end
|
.buzzing? ⇒ Boolean
27
28
29
|
# File 'lib/stay_awake.rb', line 27
def self.buzzing?
Buzzer.instance.buzzing?
end
|
.config ⇒ Object
6
7
8
|
# File 'lib/stay_awake.rb', line 6
def self.config
Configuration.instance
end
|
10
11
12
13
|
# File 'lib/stay_awake.rb', line 10
def self.configure(&block)
yield config
self
end
|
.logger ⇒ Object
15
16
17
|
# File 'lib/stay_awake.rb', line 15
def self.logger
config.logger
end
|
.shut_off ⇒ Object
31
32
33
|
# File 'lib/stay_awake.rb', line 31
def self.shut_off
Buzzer.instance.shut_off
end
|
.strategies ⇒ Object
19
20
21
|
# File 'lib/stay_awake.rb', line 19
def self.strategies
@strategies ||= []
end
|