Class: Verso::ExtrasList
Overview
Instance Attribute Summary collapse
-
#code ⇒ String
readonly
Course code.
-
#edition ⇒ String
readonly
Edition year.
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.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/verso/extras_list.rb', line 20 class ExtrasList < Verso::Base include Enumerable include HTTPGettable extend Forwardable attr_reader :code, :edition def_delegators :extras, :[], :each, :empty?, :last, :length private def extras @extras ||= get_attr(:extras). collect { |e| Extra.new(e.merge(:code => code, :edition => edition)) } end def path "/courses/#{code},#{edition}/extras/" end end |
#edition ⇒ String (readonly)
Returns Edition year.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/verso/extras_list.rb', line 20 class ExtrasList < Verso::Base include Enumerable include HTTPGettable extend Forwardable attr_reader :code, :edition def_delegators :extras, :[], :each, :empty?, :last, :length private def extras @extras ||= get_attr(:extras). collect { |e| Extra.new(e.merge(:code => code, :edition => edition)) } end def path "/courses/#{code},#{edition}/extras/" end end |