lib/ugigi/scheme.rb in ugigi-0.2 vs lib/ugigi/scheme.rb in ugigi-0.3

- old
+ new

@@ -14,7 +14,28 @@ class Index < Scheme def initialize(element) @element = element end + + def to_sosowa_index + log = link.scan(/log=(\d+?)/)[0][0].to_i + key = link.scan(/key=(\d+?)/)[0][0].to_i + pp @element["link"] + index = { + :log => log, + :key => key, + :title => title, + :author => author, + :created_at => posted_at, + :updated_at => updated_at, + :review_count => nil, + :comment_count => comment, + :point => point, + :tags => tags, + :rate => @element["eval"], + :size => size, + :url => link + } + end end end \ No newline at end of file