2014-01-07 20:29:40 +00:00
|
|
|
module JamRuby
|
|
|
|
|
class IcecastDirectory < ActiveRecord::Base
|
2014-01-14 21:22:05 +00:00
|
|
|
include JAmXml
|
2014-01-07 20:29:40 +00:00
|
|
|
self.primary_key = 'id'
|
|
|
|
|
|
2014-01-14 21:22:05 +00:00
|
|
|
|
2014-01-10 21:02:52 +00:00
|
|
|
attr_accessible :yp_url_timeout, :yp_url
|
2014-01-14 21:22:05 +00:00
|
|
|
validates :yp_url_timeout, numericality: {only_integer: true}, length: {in: 1..30}
|
|
|
|
|
|
|
|
|
|
def dumpXml (ident=1, output=$stdout)
|
|
|
|
|
hash = Hash["yp_url_timeout" => self.yp_url_timeout,
|
|
|
|
|
"yp_url" => self.yp_url]
|
|
|
|
|
self.jdumpXml(hash, "directory", ident, output)
|
|
|
|
|
end
|
2014-01-07 20:29:40 +00:00
|
|
|
|
|
|
|
|
end
|
|
|
|
|
end
|