Class: FPM::Fry::Plugin::Init::System

Inherits:
Object
  • Object
show all
Defined in:
lib/fpm/fry/plugin/init.rb

Overview

Contains information about the init system in use.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#withHash<Symbol,Object> (readonly)

Returns features of the init system.

Returns:

  • (Hash<Symbol,Object>)

    features of the init system



15
16
17
# File 'lib/fpm/fry/plugin/init.rb', line 15

def with
  @with
end

Instance Method Details

#systemd?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/fpm/fry/plugin/init.rb', line 26

def systemd?
  name == :systemd
end

#sysv?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/fpm/fry/plugin/init.rb', line 20

def sysv?
  name == :sysv
end

#upstart?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/fpm/fry/plugin/init.rb', line 23

def upstart?
  name == :upstart
end

#with?(feature) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/fpm/fry/plugin/init.rb', line 17

def with?(feature)
  !!with[feature]
end