Class: BatchlyApi::JobSchedule
- Inherits:
-
Object
- Object
- BatchlyApi::JobSchedule
- Defined in:
- lib/batchly_api/models/job_schedule.rb
Instance Attribute Summary collapse
-
#cron ⇒ String
Time Schedule for the Job in CRON notation format.
-
#timezone ⇒ String
Timezone Identifier for the Scheduled Job.
Instance Method Summary collapse
-
#key_map ⇒ Object
Defines the key map for json serialization.
- #method_missing(method_name) ⇒ Object
-
#to_json ⇒ Object
Creates JSON of the curent object.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
17 18 19 |
# File 'lib/batchly_api/models/job_schedule.rb', line 17 def method_missing (method_name) puts "there's no method called '#{method_name}'" end |
Instance Attribute Details
#cron ⇒ String
Time Schedule for the Job in CRON notation format.
http://www.nncron.ru/help/EN/working/cron-format.htm
9 10 11 |
# File 'lib/batchly_api/models/job_schedule.rb', line 9 def cron @cron end |
#timezone ⇒ String
Timezone Identifier for the Scheduled Job. Identifier should be a valid value in the standard timezone list published by Microsoft.
https://msdn.microsoft.com/en-us/library/gg154758.aspx
14 15 16 |
# File 'lib/batchly_api/models/job_schedule.rb', line 14 def timezone @timezone end |
Instance Method Details
#key_map ⇒ Object
Defines the key map for json serialization
28 29 30 31 32 33 |
# File 'lib/batchly_api/models/job_schedule.rb', line 28 def key_map hash = {} hash['Cron'] = self.cron hash['Timezone'] = self.timezone hash end |
#to_json ⇒ Object
Creates JSON of the curent object
22 23 24 25 |
# File 'lib/batchly_api/models/job_schedule.rb', line 22 def to_json hash = self.key_map() hash.to_json end |