Class: LinuxAdmin::Service
- Inherits:
-
Object
- Object
- LinuxAdmin::Service
- Extended by:
- Common
- Defined in:
- lib/linux_admin/service.rb
Direct Known Subclasses
Constant Summary
Constants included from Common
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 Common
Constructor Details
#initialize(name) ⇒ Service
Returns a new instance of Service.
27 28 29 |
# File 'lib/linux_admin/service.rb', line 27 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object Also known as: id
Returns the value of attribute name.
25 26 27 |
# File 'lib/linux_admin/service.rb', line 25 def name @name end |
Class Method Details
.new(*args) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/linux_admin/service.rb', line 17 def self.new(*args) if self == LinuxAdmin::Service service_type.new(*args) else orig_new(*args) end end |
.service_type(reload = false) ⇒ Object
7 8 9 10 |
# File 'lib/linux_admin/service.rb', line 7 def self.service_type(reload = false) return @service_type if @service_type && !reload @service_type = service_type_uncached end |