Class: TocDoc::Profile::Practitioner

Inherits:
TocDoc::Profile show all
Defined in:
lib/toc_doc/models/profile/practitioner.rb

Overview

A practitioner profile (raw +owner_type: "Account"+).

Constant Summary

Constants inherited from TocDoc::Profile

PATH

Instance Attribute Summary

Attributes inherited from Resource

#attrs

Instance Method Summary collapse

Methods inherited from TocDoc::Profile

build, find, #id, #load_full_profile!, #organization?, #practitioner?, #skills, #skills_for

Methods inherited from Resource

#==, #[], #[]=, #attribute_names, #initialize, #inspect, main_attrs, #method_missing, normalize_attrs, #to_h, #to_json

Constructor Details

This class inherits a constructor from TocDoc::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TocDoc::Resource

Instance Method Details

#to_sString

Returns the practitioner's display name.

Prefers +name_with_title+ (e.g. "Dr Jane Doe") when present, falling back to plain +name+.

Returns:

  • (String)


15
16
17
# File 'lib/toc_doc/models/profile/practitioner.rb', line 15

def to_s
  (respond_to?(:name_with_title) && name_with_title) || name
end