Class: Jbr::Mock::Job

Inherits:
Job show all
Defined in:
lib/jbr/mock/job.rb

Overview

A job that reads from Jbr.mock instead of Jobber.

Constant Summary

Constants included from Cliental

Cliental::FIELDS, Cliental::SELECTION

Instance Method Summary collapse

Methods inherited from Job

#name

Methods included from Properted

selection

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Jbr::Resource

Instance Method Details

#clientObject



21
# File 'lib/jbr/mock/job.rb', line 21

def client = Mock::Client.new(node: @node.fetch(:client, {}))

#completed_atObject



27
# File 'lib/jbr/mock/job.rb', line 27

def completed_at = @node[:completed_at]

#created_atObject



19
# File 'lib/jbr/mock/job.rb', line 19

def created_at = @node[:created_at]

#idObject?

Returns the values the app asked for.

Returns:

  • (Object, nil)

    the values the app asked for.



5
# File 'lib/jbr/mock/job.rb', line 5

def id = @node[:id]

#instructionsObject



9
# File 'lib/jbr/mock/job.rb', line 9

def instructions = @node[:instructions]

#propertyObject



23
# File 'lib/jbr/mock/job.rb', line 23

def property = Mock::Property.new(node: @node.fetch(:property, {}))

#quote_idObject



13
# File 'lib/jbr/mock/job.rb', line 13

def quote_id = @node[:quote_id]

#quote_totalObject



17
# File 'lib/jbr/mock/job.rb', line 17

def quote_total = @node[:quote_total]

#scheduled_atObject



25
# File 'lib/jbr/mock/job.rb', line 25

def scheduled_at = @node[:scheduled_at]

#statusObject



11
# File 'lib/jbr/mock/job.rb', line 11

def status = @node[:status]

#titleObject



7
# File 'lib/jbr/mock/job.rb', line 7

def title = @node[:title]

#totalObject



15
# File 'lib/jbr/mock/job.rb', line 15

def total = @node[:total]