Class: Fidget

Inherits:
Object
  • Object
show all
Defined in:
lib/fidget.rb,
lib/fidget/version.rb

Defined Under Namespace

Classes: Platform

Constant Summary collapse

VERSION =
'0.0.2'

Class Method Summary collapse

Class Method Details

.allow_sleep(handle) ⇒ Object



34
35
36
# File 'lib/fidget.rb', line 34

def self.allow_sleep(handle)
  Fidget::Platform.allow_sleep(handle)
end

.current_process(options = nil) ⇒ Object



20
21
22
# File 'lib/fidget.rb', line 20

def self.current_process(options = nil)
  Fidget::Platform.current_process(options)
end

.prevent_sleep(options = nil) ⇒ Object



24
25
26
27
28
29
30
31
32
# File 'lib/fidget.rb', line 24

def self.prevent_sleep(options = nil)
  if block_given?
    Fidget::Platform.prevent_sleep(options) do
      yield
    end
  else
    Fidget::Platform.prevent_sleep(options)
  end
end