Class: Verso::Credential
- Includes:
- HTTPGettable
- Defined in:
- lib/verso/credential.rb
Overview
Credential Resource
The usual way to get a Credential would be to use CredentialList or to get one from a related object, such as a Course object.
Instance Attribute Summary collapse
-
#admin_notes ⇒ String
readonly
HTML-formatted test administration notes.
-
#amt_seal ⇒ Booelean
(also: #amt_seal?)
readonly
Advanced Math and Technology seal.
-
#contact_info ⇒ String
readonly
Contractor contact information.
-
#cost ⇒ String
readonly
Cost.
-
#cte_seal ⇒ Boolean
(also: #cte_seal?)
readonly
CTE seal.
-
#description ⇒ String
readonly
HTML-formatted text describing the credential.
-
#has_ancestor ⇒ Boolean
(also: #has_ancestor?)
readonly
Did this credential exist in an earlier edition?.
-
#how_to_earn_it ⇒ String
readonly
HTML-formatted text about how to earn it.
-
#id ⇒ Fixnum
readonly
Credential id.
-
#items ⇒ String
readonly
Number of test items.
-
#passing_score ⇒ Sring
readonly
Passing score.
-
#pretest ⇒ Boolean?
readonly
Is a pre-test, study guide, or blueprint available?.
-
#proctor ⇒ String
readonly
Test examiner/proctor.
-
#program_area ⇒ String
readonly
Title of associated program area.
-
#retired ⇒ Boolean
(also: #retired?)
readonly
Is this credential slated for deletion?.
-
#site ⇒ String
readonly
Allowed testing site.
-
#time ⇒ String
readonly
Time allowed.
-
#title ⇒ String
readonly
Credential title.
-
#type ⇒ 'Certification', 'License'
readonly
Credential type.
-
#verified_credit ⇒ Boolean
(also: #verified_credit?)
readonly
Verified credit.
Attributes inherited from Base
Instance Method Summary collapse
-
#contacts ⇒ Array
VDOE contacts, each responding to #name, #email, and #phone, all Strings.
-
#contractor_name ⇒ String
Contractor name.
-
#details ⇒ String
Details.
-
#related_courses ⇒ Array
Collection of related Course objects.
-
#source ⇒ OpenStruct
Source.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Verso::Base
Instance Attribute Details
#admin_notes ⇒ String (readonly)
Returns HTML-formatted test administration notes.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#amt_seal ⇒ Booelean (readonly) Also known as: amt_seal?
Returns Advanced Math and Technology seal.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#contact_info ⇒ String (readonly)
Returns Contractor contact information.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#cost ⇒ String (readonly)
Returns Cost.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#cte_seal ⇒ Boolean (readonly) Also known as: cte_seal?
Returns CTE seal.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#description ⇒ String (readonly)
Returns HTML-formatted text describing the credential.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#has_ancestor ⇒ Boolean (readonly) Also known as: has_ancestor?
Returns Did this credential exist in an earlier edition?.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#how_to_earn_it ⇒ String (readonly)
Returns HTML-formatted text about how to earn it.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#id ⇒ Fixnum (readonly)
Returns Credential id.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#items ⇒ String (readonly)
Returns Number of test items.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#passing_score ⇒ Sring (readonly)
Returns Passing score.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#pretest ⇒ Boolean? (readonly)
Returns Is a pre-test, study guide, or blueprint available?.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#proctor ⇒ String (readonly)
Returns Test examiner/proctor.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#program_area ⇒ String (readonly)
Returns Title of associated program area.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#retired ⇒ Boolean (readonly) Also known as: retired?
Returns Is this credential slated for deletion?.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#site ⇒ String (readonly)
Returns Allowed testing site.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#time ⇒ String (readonly)
Returns Time allowed.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#title ⇒ String (readonly)
Returns Credential title.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#type ⇒ 'Certification', 'License' (readonly)
Returns Credential type.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
#verified_credit ⇒ Boolean (readonly) Also known as: verified_credit?
Returns Verified credit.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verso/credential.rb', line 54 class Credential < Verso::Base include HTTPGettable attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal, :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score, :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type, :verified_credit alias amt_seal? amt_seal alias cte_seal? cte_seal alias has_ancestor? has_ancestor alias retired? retired alias verified_credit? verified_credit # VDOE contacts, each responding to #name, #email, and #phone, all Strings. # # @return [Array] VDOE contacts def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end # @return [String] Contractor name def contractor_name get_attr(:contractor_name).to_s end # @return [String] Details def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end # Source. Responds to #title, #url, and #contact_info. All are Strings or # nil. The last is HTML-formatted. # # @return [OpenStruct] Source def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end # @return [Array] Collection of related {Verso::Course} objects def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end private def path "/credentials/#{id}" end def fetch super[:credential] end end |
Instance Method Details
#contacts ⇒ Array
VDOE contacts, each responding to #name, #email, and #phone, all Strings.
69 70 71 |
# File 'lib/verso/credential.rb', line 69 def contacts @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) } end |
#contractor_name ⇒ String
Returns Contractor name.
74 75 76 |
# File 'lib/verso/credential.rb', line 74 def contractor_name get_attr(:contractor_name).to_s end |
#details ⇒ String
Returns Details.
79 80 81 |
# File 'lib/verso/credential.rb', line 79 def details get_attr(:details).to_s # #to_s b/c API sometimes returns nil end |
#related_courses ⇒ Array
Returns Collection of related Verso::Course objects.
94 95 96 |
# File 'lib/verso/credential.rb', line 94 def @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) } end |
#source ⇒ OpenStruct
Source. Responds to #title, #url, and #contact_info. All are Strings or nil. The last is HTML-formatted.
87 88 89 90 91 |
# File 'lib/verso/credential.rb', line 87 def source # force update if we only have part of source attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url) OpenStruct.new(get_attr(:source)) end |