Class: Jbr::Mock::LineItem

Inherits:
LineItem show all
Defined in:
lib/jbr/mock/line_item.rb

Overview

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

Constant Summary

Constants inherited from LineItem

LineItem::FIELDS, LineItem::PAGE, LineItem::SELECTION

Instance Attribute Summary

Attributes inherited from Resource

#id

Instance Method Summary collapse

Methods inherited from LineItem

from, #quantified, #to_s

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Jbr::Resource

Instance Method Details

#descriptionObject



10
# File 'lib/jbr/mock/line_item.rb', line 10

def description = @node[:description]

#nameObject



8
# File 'lib/jbr/mock/line_item.rb', line 8

def name = @node[:name]

#quantityObject?

Returns the values the app asked for. The quantity is still read whole, so an app that mocks 3.0 of a thing sees the 3 a page would show.

Returns:

  • (Object, nil)

    the values the app asked for. The quantity is still read whole, so an app that mocks 3.0 of a thing sees the 3 a page would show.



6
# File 'lib/jbr/mock/line_item.rb', line 6

def quantity = whole @node[:quantity]