Class: Company::Job
Overview
Work the business accepted and scheduled.
Class Method Summary collapse
-
.attributes ⇒ Object
What every job reads, by the vocabulary's names.
Instance Method Summary collapse
-
#amount ⇒ BigDecimal?
What the job comes to, in dollars.
-
#completed_at ⇒ Time?
Moment the work was finished.
-
#created_at ⇒ Time
Moment the job was opened.
-
#description ⇒ String?
What the work is called, in the words of whoever opened the job.
-
#lines ⇒ Array<Line>
Lines the work is billed as, empty where none came back.
-
#location ⇒ Location?
Where the work happens, where it came back beside the job.
-
#notes ⇒ String?
What was written on the job for the crew to mind.
-
#quote ⇒ Quote?
Quote the job was won with, where it came back beside the job.
-
#scheduled_at ⇒ Time?
Moment the work is booked for.
Methods inherited from Resource
#id, #initialize, keys, node_keys
Constructor Details
This class inherits a constructor from Company::Resource
Class Method Details
.attributes ⇒ Object
What every job reads, by the vocabulary's names.
5 |
# File 'lib/company/resources/job.rb', line 5 def self.attributes = i[id description notes created_at scheduled_at completed_at amount] |
Instance Method Details
#amount ⇒ BigDecimal?
Returns what the job comes to, in dollars.
23 |
# File 'lib/company/resources/job.rb', line 23 def amount = decimal :amount |
#completed_at ⇒ Time?
Returns moment the work was finished.
20 |
# File 'lib/company/resources/job.rb', line 20 def completed_at = time :completed_at |
#created_at ⇒ Time
Returns moment the job was opened.
14 |
# File 'lib/company/resources/job.rb', line 14 def created_at = time :created_at |
#description ⇒ String?
Returns what the work is called, in the words of whoever opened the job.
8 |
# File 'lib/company/resources/job.rb', line 8 def description = attribute :description |
#lines ⇒ Array<Line>
Returns lines the work is billed as, empty where none came back.
29 |
# File 'lib/company/resources/job.rb', line 29 def lines = records Line, :lines |
#location ⇒ Location?
Returns where the work happens, where it came back beside the job.
32 |
# File 'lib/company/resources/job.rb', line 32 def location = record Location, :location |
#notes ⇒ String?
Returns what was written on the job for the crew to mind.
11 |
# File 'lib/company/resources/job.rb', line 11 def notes = attribute :notes |
#quote ⇒ Quote?
Returns quote the job was won with, where it came back beside the job.
26 |
# File 'lib/company/resources/job.rb', line 26 def quote = record Quote, :quote |
#scheduled_at ⇒ Time?
Returns moment the work is booked for.
17 |
# File 'lib/company/resources/job.rb', line 17 def scheduled_at = time :scheduled_at |