Class: Verso::Extra
- Includes:
- HTTPGettable
- Defined in:
- lib/verso/extra.rb
Overview
Extra resource
An extra (or related material) associated with a Course framework in Verso.
Instance Attribute Summary collapse
-
#code ⇒ String
readonly
Course code.
-
#description ⇒ String
readonly
HTML-formatted Extra description.
-
#edition ⇒ String
readonly
Edition year.
-
#name ⇒ String
readonly
Extra name, used as an identifier and not to be confused with its title, found by ExtrasList.
-
#title ⇒ String
readonly
Extra title.
Attributes inherited from Base
Method Summary
Methods inherited from Base
Constructor Details
This class inherits a constructor from Verso::Base
Instance Attribute Details
#code ⇒ String (readonly)
Returns Course code.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/verso/extra.rb', line 26 class Extra < Verso::Base include HTTPGettable attr_reader :code, :description, :edition, :name, :title private def path "/courses/#{code},#{edition}/extras/#{name}" end def fetch super[:extra] end end |
#description ⇒ String (readonly)
Returns HTML-formatted Extra description.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/verso/extra.rb', line 26 class Extra < Verso::Base include HTTPGettable attr_reader :code, :description, :edition, :name, :title private def path "/courses/#{code},#{edition}/extras/#{name}" end def fetch super[:extra] end end |
#edition ⇒ String (readonly)
Returns Edition year.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/verso/extra.rb', line 26 class Extra < Verso::Base include HTTPGettable attr_reader :code, :description, :edition, :name, :title private def path "/courses/#{code},#{edition}/extras/#{name}" end def fetch super[:extra] end end |
#name ⇒ String (readonly)
Returns Extra name, used as an identifier and not to be confused with its title, found by Verso::ExtrasList.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/verso/extra.rb', line 26 class Extra < Verso::Base include HTTPGettable attr_reader :code, :description, :edition, :name, :title private def path "/courses/#{code},#{edition}/extras/#{name}" end def fetch super[:extra] end end |
#title ⇒ String (readonly)
Returns Extra title.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/verso/extra.rb', line 26 class Extra < Verso::Base include HTTPGettable attr_reader :code, :description, :edition, :name, :title private def path "/courses/#{code},#{edition}/extras/#{name}" end def fetch super[:extra] end end |