Class: SuperspeedCli::Log

Inherits:
Object
  • Object
show all
Defined in:
lib/superspeed-cli/log.rb

Constant Summary collapse

DATE_FORMAT =
'%d-%m-%Y'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#billingcodeObject

Returns the value of attribute billingcode.



15
16
17
# File 'lib/superspeed-cli/log.rb', line 15

def billingcode
  @billingcode
end

#dateObject

Returns the value of attribute date.



15
16
17
# File 'lib/superspeed-cli/log.rb', line 15

def date
  @date
end

#descriptionObject

Returns the value of attribute description.



15
16
17
# File 'lib/superspeed-cli/log.rb', line 15

def description
  @description
end

#hoursObject

Returns the value of attribute hours.



15
16
17
# File 'lib/superspeed-cli/log.rb', line 15

def hours
  @hours
end

#taskObject

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_jsonObject



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