lib/flix_cloud/job.rb in zencoder-flix_cloud-gem-0.0.0 vs lib/flix_cloud/job.rb in zencoder-flix_cloud-gem-0.1.1

- old
+ new

@@ -44,9 +44,26 @@ end response.success? end + def save! + raise FlixCloud::SaveError unless save + true + end + + def self.create(attrs={}) + job = new(attrs) + job.save + job + end + + def self.create!(attrs={}) + job = create(attrs) + raise FlixCloud::CreateError unless job.id + job + end + def to_xml xml = Builder::XmlMarkup.new xml.instruct! :xml, :version => "1.0", :encoding => "UTF-8"