Class: SuperspeedCli::Log
- Inherits:
-
Object
- Object
- SuperspeedCli::Log
- Defined in:
- lib/superspeed-cli/log.rb
Constant Summary collapse
- DATE_FORMAT =
'%d-%m-%Y'
Instance Attribute Summary collapse
-
#billingcode ⇒ Object
Returns the value of attribute billingcode.
-
#date ⇒ Object
Returns the value of attribute date.
-
#description ⇒ Object
Returns the value of attribute description.
-
#hours ⇒ Object
Returns the value of attribute hours.
-
#task ⇒ Object
Returns the value of attribute task.
Instance Method Summary collapse
Instance Attribute Details
#billingcode ⇒ Object
Returns the value of attribute billingcode.
15 16 17 |
# File 'lib/superspeed-cli/log.rb', line 15 def billingcode @billingcode end |
#date ⇒ Object
Returns the value of attribute date.
15 16 17 |
# File 'lib/superspeed-cli/log.rb', line 15 def date @date end |
#description ⇒ Object
Returns the value of attribute description.
15 16 17 |
# File 'lib/superspeed-cli/log.rb', line 15 def description @description end |
#hours ⇒ Object
Returns the value of attribute hours.
15 16 17 |
# File 'lib/superspeed-cli/log.rb', line 15 def hours @hours end |
#task ⇒ Object
Returns the value of attribute task.
15 16 17 |
# File 'lib/superspeed-cli/log.rb', line 15 def task @task end |
Instance Method Details
#to_json ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/superspeed-cli/log.rb', line 17 def to_json JSON.generate({ startDate: start_date.strftime(DATE_FORMAT), endDate: end_date.strftime(DATE_FORMAT), task: task, taskId: task_id, description: description, billingcode: billingcode, hours: hours }) end |