Class: Company::Technician

Inherits:
Resource show all
Defined in:
lib/company/resources/technician.rb

Overview

A person the business sends out: whoever a visit is booked for.

Class Method Summary collapse

Instance Method Summary collapse

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 technician reads, by the vocabulary's names.



5
# File 'lib/company/resources/technician.rb', line 5

def self.attributes = %i[id name surname]

Instance Method Details

#name ⇒ String?

Returns what they go by: a given name.

Returns:

  • (String, nil) —

    what they go by: a given name.



8
# File 'lib/company/resources/technician.rb', line 8

def name = attribute :name

#surname ⇒ String?

Returns their surname.

Returns:

  • (String, nil) —

    their surname.



11
# File 'lib/company/resources/technician.rb', line 11

def surname = attribute :surname