Sha256: acd6d9dda5ad97d6425a1f733909a0ae189e7dc5363b4106c953be73c560d40f

Contents?: true

Size: 1.01 KB

Versions: 4

Compression:

Stored size: 1.01 KB

Contents

# ListOfHelpers is used to create a lecture table.

module ListOfHelpers
  # List_of creates and renders a lecture table based on the given info.
  #
  # source:       name of a section as a string
  # rows:         array with one or more of:
  #               "pages"
  #               "subsections"
  # cols:         array with one or more of:
  #               :date
  #               :number
  #               :title
  #               :homeworks
  #               :assigned
  #               :lectref
  # subsections:  array with one or more strings corresponding to subsection
  #               string in an item
  #               e.g. "/content/topics/arch/"
  # items:        refers to nanoc's @items (temp hack!)
  def list_of(source:, rows:, cols:, headers: {}, subsections: [], items:)
    markup_adaptor = BootstrapMarkup.new
    data_adaptor = DataAdaptor.new(source)
    lecture_table_builder = ListOf.new(markup_adaptor, data_adaptor, rows, cols, subsections, items, headers)
    lecture_table_builder.render
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
coursegen-0.9.25 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.24 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.21 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.20 lib/coursegen/course/helpers/list_of_helpers.rb