Class: Verso::ProgramArea
- Includes:
- HTTPGettable, Sluggable
- Defined in:
- lib/verso/program_area.rb
Overview
Program Area
Contained by ProgramAreaList resource
Instance Attribute Summary collapse
-
#deprecated ⇒ Boolean
readonly
Is this Program Area deprecated?.
-
#official ⇒ Boolean
readonly
Is this an official VDOE Program Area?.
-
#section_overview ⇒ String
readonly
HTML-formatted text describing Program Area.
-
#title ⇒ String
readonly
Program Area title.
-
#version_date ⇒ String
readonly
Date of last update.
Attributes inherited from Base
Instance Method Summary collapse
-
#courses ⇒ Array
Collection of related Course objects.
-
#description ⇒ String
Empty string to make consistent interface.
Methods included from Sluggable
Methods inherited from Base
Constructor Details
This class inherits a constructor from Verso::Base
Instance Attribute Details
#deprecated ⇒ Boolean (readonly)
Returns Is this Program Area deprecated?.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/verso/program_area.rb', line 23 class ProgramArea < Verso::Base include HTTPGettable include Sluggable attr_reader :deprecated, :official, :section_overview, :title, :version_date # @return [Array] Collection of related {Verso::Course} objects def courses @courses ||= CourseList.new(:program_area => slug.gsub('-', ' ')). sort_by { |c| c.title + c.edition }. uniq { |c| c.code + c.edition } end # @return [String] Empty string to make consistent interface def description "" end private def path "/program_areas/" end def fetch super[:program_areas].find { |pa| pa[:title] == title } end end |
#official ⇒ Boolean (readonly)
Returns Is this an official VDOE Program Area?.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/verso/program_area.rb', line 23 class ProgramArea < Verso::Base include HTTPGettable include Sluggable attr_reader :deprecated, :official, :section_overview, :title, :version_date # @return [Array] Collection of related {Verso::Course} objects def courses @courses ||= CourseList.new(:program_area => slug.gsub('-', ' ')). sort_by { |c| c.title + c.edition }. uniq { |c| c.code + c.edition } end # @return [String] Empty string to make consistent interface def description "" end private def path "/program_areas/" end def fetch super[:program_areas].find { |pa| pa[:title] == title } end end |
#section_overview ⇒ String (readonly)
Returns HTML-formatted text describing Program Area.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/verso/program_area.rb', line 23 class ProgramArea < Verso::Base include HTTPGettable include Sluggable attr_reader :deprecated, :official, :section_overview, :title, :version_date # @return [Array] Collection of related {Verso::Course} objects def courses @courses ||= CourseList.new(:program_area => slug.gsub('-', ' ')). sort_by { |c| c.title + c.edition }. uniq { |c| c.code + c.edition } end # @return [String] Empty string to make consistent interface def description "" end private def path "/program_areas/" end def fetch super[:program_areas].find { |pa| pa[:title] == title } end end |
#title ⇒ String (readonly)
Returns Program Area title.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/verso/program_area.rb', line 23 class ProgramArea < Verso::Base include HTTPGettable include Sluggable attr_reader :deprecated, :official, :section_overview, :title, :version_date # @return [Array] Collection of related {Verso::Course} objects def courses @courses ||= CourseList.new(:program_area => slug.gsub('-', ' ')). sort_by { |c| c.title + c.edition }. uniq { |c| c.code + c.edition } end # @return [String] Empty string to make consistent interface def description "" end private def path "/program_areas/" end def fetch super[:program_areas].find { |pa| pa[:title] == title } end end |
#version_date ⇒ String (readonly)
Returns Date of last update.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/verso/program_area.rb', line 23 class ProgramArea < Verso::Base include HTTPGettable include Sluggable attr_reader :deprecated, :official, :section_overview, :title, :version_date # @return [Array] Collection of related {Verso::Course} objects def courses @courses ||= CourseList.new(:program_area => slug.gsub('-', ' ')). sort_by { |c| c.title + c.edition }. uniq { |c| c.code + c.edition } end # @return [String] Empty string to make consistent interface def description "" end private def path "/program_areas/" end def fetch super[:program_areas].find { |pa| pa[:title] == title } end end |
Instance Method Details
#courses ⇒ Array
Returns Collection of related Course objects.
29 30 31 32 33 |
# File 'lib/verso/program_area.rb', line 29 def courses @courses ||= CourseList.new(:program_area => slug.gsub('-', ' ')). sort_by { |c| c.title + c.edition }. uniq { |c| c.code + c.edition } end |
#description ⇒ String
Returns Empty string to make consistent interface.
36 37 38 |
# File 'lib/verso/program_area.rb', line 36 def description "" end |