Method: Milkode::InfoPackage#initialize

Defined in:
lib/milkode/cdweb/lib/info_package.rb

#initialize(name, suburl) ⇒ InfoPackage

Returns a new instance of InfoPackage.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/milkode/cdweb/lib/info_package.rb', line 17

def initialize(name, suburl)
  @suburl = suburl
  
  records = Database.instance.package_records(name)
  # plangs  = sorted_plangs(records)
  
  @summary_content = "<table class=\"table-striped table-bordered table-condensed\">\n  <tr><td>\u30D5\u30A1\u30A4\u30EB\u6570</td><td align=\"right\">\#{records.size}</td></tr>\n  <tr><td>\u884C\u6570</td><td align=\"right\">\#{line_count_total(records)}</td></tr>\n</table>\n"

  @plang_content = "<table class=\"table-striped table-bordered table-condensed\">\n\#{breakdown_detail(name, records)}\n</table>\n"
end