Class: Milkode::InfoHome
- Inherits:
-
Object
- Object
- Milkode::InfoHome
- Defined in:
- lib/milkode/cdweb/lib/info_home.rb
Instance Attribute Summary collapse
-
#record_content ⇒ Object
readonly
Returns the value of attribute record_content.
-
#summary_content ⇒ Object
readonly
Returns the value of attribute summary_content.
Instance Method Summary collapse
-
#initialize(suburl) ⇒ InfoHome
constructor
A new instance of InfoHome.
Constructor Details
#initialize(suburl) ⇒ InfoHome
Returns a new instance of InfoHome.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/milkode/cdweb/lib/info_home.rb', line 13 def initialize(suburl) packages = Database.instance.packages(nil) @summary_content = "<table class=\"table-striped table-bordered table-condensed\">\n <tr><td>\u30D1\u30C3\u30B1\u30FC\u30B8\u6570</td><td align=\"right\">\#{packages.size}</td></tr>\n <tr><td>\u30D5\u30A1\u30A4\u30EB\u6570</td><td align=\"right\">\#{Database.instance.totalRecords}</td></tr>\n</table>\n" @record_content = packages.map do |name| "<dt class='result-file'><img src='#{suburl}/images/info.png'/><a href='#{suburl}/info/#{name}'>#{name}</a></dt>" end.join("\n") end |
Instance Attribute Details
#record_content ⇒ Object (readonly)
Returns the value of attribute record_content.
10 11 12 |
# File 'lib/milkode/cdweb/lib/info_home.rb', line 10 def record_content @record_content end |
#summary_content ⇒ Object (readonly)
Returns the value of attribute summary_content.
11 12 13 |
# File 'lib/milkode/cdweb/lib/info_home.rb', line 11 def summary_content @summary_content end |