class FPM::Fry::Plugin::Init::System

Contains information about the init system in use.

Attributes

name[R]
with[R]

@return [Hash<Symbol,Object>] features of the init system

Public Class Methods

new(name, with) click to toggle source
# File lib/fpm/fry/plugin/init.rb, line 31
def initialize(name, with)
  @name, @with = name, with
end

Public Instance Methods

systemd?() click to toggle source
# File lib/fpm/fry/plugin/init.rb, line 26
def systemd?
  name == :systemd
end
sysv?() click to toggle source
# File lib/fpm/fry/plugin/init.rb, line 20
def sysv?
  name == :sysv
end
upstart?() click to toggle source
# File lib/fpm/fry/plugin/init.rb, line 23
def upstart?
  name == :upstart
end
with?(feature) click to toggle source
# File lib/fpm/fry/plugin/init.rb, line 17
def with?(feature)
  !!with[feature]
end