Class: Longleaf::ServiceDefinition
- Inherits:
-
Object
- Object
- Longleaf::ServiceDefinition
- Defined in:
- lib/longleaf/models/service_definition.rb
Overview
Definition of a configured preservation service
Instance Attribute Summary collapse
-
#delay ⇒ Object
readonly
Returns the value of attribute delay.
-
#frequency ⇒ Object
readonly
Returns the value of attribute frequency.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#work_class ⇒ Object
readonly
Returns the value of attribute work_class.
-
#work_script ⇒ Object
readonly
Returns the value of attribute work_script.
Instance Method Summary collapse
-
#initialize(name:, work_script:, work_class: nil, frequency: nil, delay: nil, properties: Hash.new) ⇒ ServiceDefinition
constructor
A new instance of ServiceDefinition.
Constructor Details
#initialize(name:, work_script:, work_class: nil, frequency: nil, delay: nil, properties: Hash.new) ⇒ ServiceDefinition
Returns a new instance of ServiceDefinition.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/longleaf/models/service_definition.rb', line 11 def initialize(name:, work_script:, work_class: nil, frequency: nil, delay: nil, properties: Hash.new) raise ArgumentError.new("Parameters name and work_script are required") unless name && work_script @properties = properties @name = name @work_script = work_script @work_class = work_class @frequency = frequency @delay = delay end |
Instance Attribute Details
#delay ⇒ Object (readonly)
Returns the value of attribute delay.
8 9 10 |
# File 'lib/longleaf/models/service_definition.rb', line 8 def delay @delay end |
#frequency ⇒ Object (readonly)
Returns the value of attribute frequency.
8 9 10 |
# File 'lib/longleaf/models/service_definition.rb', line 8 def frequency @frequency end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/longleaf/models/service_definition.rb', line 6 def name @name end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
9 10 11 |
# File 'lib/longleaf/models/service_definition.rb', line 9 def properties @properties end |
#work_class ⇒ Object (readonly)
Returns the value of attribute work_class.
7 8 9 |
# File 'lib/longleaf/models/service_definition.rb', line 7 def work_class @work_class end |
#work_script ⇒ Object (readonly)
Returns the value of attribute work_script.
7 8 9 |
# File 'lib/longleaf/models/service_definition.rb', line 7 def work_script @work_script end |