Class: Verso::Frontmatter

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

Overview

Frontmatter resource

Frontmatter for Course framework.

Note:

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

Options Hash (attrs):

  • :code (String)

    Course code Required

  • :edition (String)

    Edition year Required

See Also:

Instance Attribute Summary collapse

Attributes inherited from Base

#attrs

Method Summary

Methods inherited from Base

attr_reader, #initialize

Constructor Details

This class inherits a constructor from Verso::Base

Instance Attribute Details

#acknowledgments_textString (readonly)

Returns HTML-formatted acknowledgments.

Returns:

  • (String)

    HTML-formatted acknowledgments



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/verso/frontmatter.rb', line 34

class Frontmatter < Verso::Base
  include HTTPGettable
  attr_reader :acknowledgments_text, :attribution_block, :code,
    :copyright_year, :developed_by, :developed_for, :edition,
    :foreword_text, :introduction_text, :notice_block

private

  def fetch
    super[:frontmatter]
  end

  def path
    "/courses/#{code},#{edition}/frontmatter"
  end
end

#attribution_blockString (readonly)

Returns HTML-formatted attribution.

Returns:

  • (String)

    HTML-formatted attribution



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/verso/frontmatter.rb', line 34

class Frontmatter < Verso::Base
  include HTTPGettable
  attr_reader :acknowledgments_text, :attribution_block, :code,
    :copyright_year, :developed_by, :developed_for, :edition,
    :foreword_text, :introduction_text, :notice_block

private

  def fetch
    super[:frontmatter]
  end

  def path
    "/courses/#{code},#{edition}/frontmatter"
  end
end

#codeString (readonly)

Returns Course code.

Returns:

  • (String)

    Course code



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/verso/frontmatter.rb', line 34

class Frontmatter < Verso::Base
  include HTTPGettable
  attr_reader :acknowledgments_text, :attribution_block, :code,
    :copyright_year, :developed_by, :developed_for, :edition,
    :foreword_text, :introduction_text, :notice_block

private

  def fetch
    super[:frontmatter]
  end

  def path
    "/courses/#{code},#{edition}/frontmatter"
  end
end

Returns Copyright year.

Returns:

  • (String)

    Copyright year



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/verso/frontmatter.rb', line 34

class Frontmatter < Verso::Base
  include HTTPGettable
  attr_reader :acknowledgments_text, :attribution_block, :code,
    :copyright_year, :developed_by, :developed_for, :edition,
    :foreword_text, :introduction_text, :notice_block

private

  def fetch
    super[:frontmatter]
  end

  def path
    "/courses/#{code},#{edition}/frontmatter"
  end
end

#developed_byString (readonly)

Returns HTML-formatted developed-by text.

Returns:

  • (String)

    HTML-formatted developed-by text



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/verso/frontmatter.rb', line 34

class Frontmatter < Verso::Base
  include HTTPGettable
  attr_reader :acknowledgments_text, :attribution_block, :code,
    :copyright_year, :developed_by, :developed_for, :edition,
    :foreword_text, :introduction_text, :notice_block

private

  def fetch
    super[:frontmatter]
  end

  def path
    "/courses/#{code},#{edition}/frontmatter"
  end
end

#developed_forString (readonly)

Returns HTML-formatted developed-for text.

Returns:

  • (String)

    HTML-formatted developed-for text



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/verso/frontmatter.rb', line 34

class Frontmatter < Verso::Base
  include HTTPGettable
  attr_reader :acknowledgments_text, :attribution_block, :code,
    :copyright_year, :developed_by, :developed_for, :edition,
    :foreword_text, :introduction_text, :notice_block

private

  def fetch
    super[:frontmatter]
  end

  def path
    "/courses/#{code},#{edition}/frontmatter"
  end
end

#editionString (readonly)

Returns Edition year.

Returns:

  • (String)

    Edition year



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/verso/frontmatter.rb', line 34

class Frontmatter < Verso::Base
  include HTTPGettable
  attr_reader :acknowledgments_text, :attribution_block, :code,
    :copyright_year, :developed_by, :developed_for, :edition,
    :foreword_text, :introduction_text, :notice_block

private

  def fetch
    super[:frontmatter]
  end

  def path
    "/courses/#{code},#{edition}/frontmatter"
  end
end

#foreword_textString (readonly)

Returns HTML-formatted foreword.

Returns:

  • (String)

    HTML-formatted foreword



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/verso/frontmatter.rb', line 34

class Frontmatter < Verso::Base
  include HTTPGettable
  attr_reader :acknowledgments_text, :attribution_block, :code,
    :copyright_year, :developed_by, :developed_for, :edition,
    :foreword_text, :introduction_text, :notice_block

private

  def fetch
    super[:frontmatter]
  end

  def path
    "/courses/#{code},#{edition}/frontmatter"
  end
end

#introduction_textString (readonly)

Returns HTML-formatted introduction_text.

Returns:

  • (String)

    HTML-formatted introduction_text



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/verso/frontmatter.rb', line 34

class Frontmatter < Verso::Base
  include HTTPGettable
  attr_reader :acknowledgments_text, :attribution_block, :code,
    :copyright_year, :developed_by, :developed_for, :edition,
    :foreword_text, :introduction_text, :notice_block

private

  def fetch
    super[:frontmatter]
  end

  def path
    "/courses/#{code},#{edition}/frontmatter"
  end
end

#notice_blockString (readonly)

Returns HTML formatted notice_block.

Returns:

  • (String)

    HTML formatted notice_block



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/verso/frontmatter.rb', line 34

class Frontmatter < Verso::Base
  include HTTPGettable
  attr_reader :acknowledgments_text, :attribution_block, :code,
    :copyright_year, :developed_by, :developed_for, :edition,
    :foreword_text, :introduction_text, :notice_block

private

  def fetch
    super[:frontmatter]
  end

  def path
    "/courses/#{code},#{edition}/frontmatter"
  end
end