Class: Jbr::Visits
- Includes:
- Enumerable, Includable
- Defined in:
- lib/jbr/visits.rb
Overview
The visits on a Jobber account, oldest first, walked a page at a time.
Direct Known Subclasses
Constant Summary collapse
- FIELDS =
What a visit answers with, before anything it was asked to bring back with it.
'id title startAt endAt allDay clientConfirmed job { id }'
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#each ⇒ Object
Every visit on the account, past and future alike.
-
#past ⇒ Enumerator<Visit>
The visits that started before now.
-
#upcoming ⇒ Enumerator<Visit>
The visits scheduled from now on.
Methods included from Includable
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Jbr::Resource
Instance Method Details
#each ⇒ Object
Every visit on the account, past and future alike. Nothing is read until the walk starts, and a page is read only once the one before it runs out.
11 |
# File 'lib/jbr/visits.rb', line 11 def each(&) = walk.each(&) |
#past ⇒ Enumerator<Visit>
Returns the visits that started before now.
17 |
# File 'lib/jbr/visits.rb', line 17 def past = walk until_now |
#upcoming ⇒ Enumerator<Visit>
Returns the visits scheduled from now on.
14 |
# File 'lib/jbr/visits.rb', line 14 def upcoming = walk from_now |