lib/ayadn/fileops.rb in ayadn-1.7.6 vs lib/ayadn/fileops.rb in ayadn-1.7.7
- old
+ new
@@ -1,8 +1,12 @@
# encoding: utf-8
module Ayadn
class FileOps
+ def self.save_links(obj, name)
+ File.write(Settings.config[:paths][:lists] + "/#{name}", obj.to_json)
+ end
+
def self.save_post(resp)
File.write(Settings.config[:paths][:posts] + "/#{resp['data']['id']}.json", resp['data'].to_json)
end
def self.save_message(resp)