Class: Kisaweb::OnlineRanki
Class Method Summary collapse
Class Method Details
.categories ⇒ Object
16 17 18 19 |
# File 'lib/kisaweb/online_ranki.rb', line 16 def self.categories @@categories ||= parse_categories(Iconv.iconv('utf-8', 'latin1', fetch_categories.body).first.strip) end |
.date ⇒ Object
12 13 14 |
# File 'lib/kisaweb/online_ranki.rb', line 12 def self.date @@date ||= Date.parse(Iconv.iconv('utf-8', 'latin1', fetch_date.body).first.strip) end |
.find(klass) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/kisaweb/online_ranki.rb', line 3 def self.find(klass) res = fetch_class(:klass => klass) res_arr = FasterCSV.parse(Iconv.iconv('utf-8', 'latin1', res.body).first.strip) res_arr.shift res_arr.map do |row| ListItem.from_array(row) end end |