Class: Verso::Emphasis

Inherits:
Base
  • Object
show all
Includes:
HTTPGettable
Defined in:
lib/verso/emphasis.rb

Overview

Academic Emphasis resource

Note:

Any attributes may be set upon instantiation, using Options Hash. The following are required:

Options Hash (attrs):

  • :id (Fixnum)

    Academic Emphasis id Required

See Also:

Instance Attribute Summary collapse

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

attr_reader, #initialize

Constructor Details

This class inherits a constructor from Verso::Base

Instance Attribute Details

#idFixnum (readonly)

Returns Academic Emphasis id.

Returns:

  • (Fixnum)

    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

#titleObject (readonly)

Returns Academic Emphasis title.

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_dataArray

Returns Collection of related OccupationData objects.

Returns:



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