Class: Verso::Emphasis
- Includes:
- HTTPGettable
- Defined in:
- lib/verso/emphasis.rb
Overview
Academic Emphasis resource
Instance Attribute Summary collapse
-
#id ⇒ Fixnum
readonly
Academic Emphasis id.
-
#title ⇒ Object
readonly
Academic Emphasis title.
Attributes inherited from Base
Instance Method Summary collapse
-
#occupation_data ⇒ Array
Collection of related OccupationData objects.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Verso::Base
Instance Attribute Details
#id ⇒ Fixnum (readonly)
Returns Academic Emphasis id.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/verso/emphasis.rb', line 15 class Emphasis < Verso::Base include HTTPGettable attr_reader :id, :title # @return [Array] Collection of related {Verso::OccupationData} objects def occupation_data @occupation_data ||= get_attr(:occupation_data). collect { |od| OccupationData.new(od) } end private def fetch super[:emphasis] end def path "/academics/#{id}" end end |
#title ⇒ Object (readonly)
Returns Academic Emphasis title.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/verso/emphasis.rb', line 15 class Emphasis < Verso::Base include HTTPGettable attr_reader :id, :title # @return [Array] Collection of related {Verso::OccupationData} objects def occupation_data @occupation_data ||= get_attr(:occupation_data). collect { |od| OccupationData.new(od) } end private def fetch super[:emphasis] end def path "/academics/#{id}" end end |
Instance Method Details
#occupation_data ⇒ Array
Returns Collection of related OccupationData objects.
20 21 22 23 |
# File 'lib/verso/emphasis.rb', line 20 def occupation_data @occupation_data ||= get_attr(:occupation_data). collect { |od| OccupationData.new(od) } end |