Class: LinuxAdmin::Service
- Inherits:
-
Object
- Object
- LinuxAdmin::Service
- Includes:
- Logging
- Defined in:
- lib/linux_admin/service.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
(also: #id)
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name) ⇒ Service
constructor
A new instance of Service.
Methods included from Logging
Constructor Details
#initialize(name) ⇒ Service
Returns a new instance of Service.
25 26 27 |
# File 'lib/linux_admin/service.rb', line 25 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object Also known as: id
Returns the value of attribute name.
23 24 25 |
# File 'lib/linux_admin/service.rb', line 23 def name @name end |
Class Method Details
.new(*args) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/linux_admin/service.rb', line 15 def self.new(*args) if self == LinuxAdmin::Service service_type.new(*args) else orig_new(*args) end end |
.service_type(reload = false) ⇒ Object
5 6 7 8 |
# File 'lib/linux_admin/service.rb', line 5 def self.service_type(reload = false) return @service_type if @service_type && !reload @service_type = service_type_uncached end |