Class: Vigilem::X11::Stat

Inherits:
Core::Stat
  • Object
show all
Defined in:
lib/vigilem/x11/stat.rb

Overview

Stat(us) of X11 and the handler gem associated with it

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gem_name = 'vigilem-x11', opts = {}, &api_check) ⇒ Stat

Returns a new instance of Stat.

Parameters:

  • gem_name, (String)

    defaults to ‘vigilem-x11’

  • api_check, (Proc)

    defaults to Proc.new { !!ENV }



12
13
14
15
16
17
18
19
# File 'lib/vigilem/x11/stat.rb', line 12

def initialize(gem_name='vigilem-x11', opts={}, &api_check)
  system_name = 'x11'
  if block_given?
    super(system_name, gem_name, opts, &api_check)
  else
    super(system_name, gem_name, opts) { !!ENV['DISPLAY'] }
  end
end

Class Method Details

.defaultStat

Returns:



23
24
25
# File 'lib/vigilem/x11/stat.rb', line 23

def self.default
  @default ||= new
end