Class: JenkinsCron::Job
- Inherits:
-
Object
- Object
- JenkinsCron::Job
- Defined in:
- lib/jenkins_cron/job.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(schedule, name, &block) ⇒ Job
constructor
A new instance of Job.
Constructor Details
#initialize(schedule, name, &block) ⇒ Job
Returns a new instance of Job.
4 5 6 7 8 9 10 |
# File 'lib/jenkins_cron/job.rb', line 4 def initialize(schedule, name, &block) @schedule = schedule @name = name @params = { name: "#{@schedule.name}-#{@name}" } instance_eval(&block) @params.freeze end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/jenkins_cron/job.rb', line 2 def name @name end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
2 3 4 |
# File 'lib/jenkins_cron/job.rb', line 2 def params @params end |