Sha256: 0d00e03465908a31d8dccab81c906194a425697f75cac53a42a0886818898f0a

Contents?: true

Size: 1.01 KB

Versions: 18

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

18 entries across 18 versions & 1 rubygems

Version Path
coursegen-0.9.19 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.18 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.17 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.16 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.15 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.14 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.13 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.12 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.11 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.10 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.9 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.8 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.7 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.6 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.4 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.3 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.2 lib/coursegen/course/helpers/list_of_helpers.rb
coursegen-0.9.1 lib/coursegen/course/helpers/list_of_helpers.rb