Sha256: 77cae3195be0111a9aa3068ed5dcff9d2a0802a557ff253b768689223df04e99

Contents?: true

Size: 669 Bytes

Versions: 7

Compression:

Stored size: 669 Bytes

Contents

class FlixCloud::FileLocations < FlixCloud::Record

  record_column :input, 'File'
  record_column :output, 'File'
  record_column :watermark, 'File'
  record_column :thumbnails, 'File'

  def valid?
    self.errors = []

    if input
      unless input.valid?
        self.errors << {:input => input.errors}
      end
    else
      self.errors << "input is required"
    end

    if output
      unless output.valid?
        self.errors << {:output => output.errors}
      end
    else
      self.errors << "output is required"
    end

    if watermark && !watermark.valid?
      self.errors << {:watermark => watermark.errors}
    end

    errors.empty?
  end

end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
flixcloud-flix_cloud-gem-0.5.4 lib/flix_cloud/file_locations.rb
flixcloud-flix_cloud-gem-0.5.5 lib/flix_cloud/file_locations.rb
spob-flix_cloud-gem-0.5.3 lib/flix_cloud/file_locations.rb
spob-flix_cloud-gem-0.5.4 lib/flix_cloud/file_locations.rb
spob-flix_cloud-gem-0.6.2 lib/flix_cloud/file_locations.rb
spob-flix_cloud-gem-0.6.1 lib/flix_cloud/file_locations.rb
spob-flix_cloud-gem-0.6 lib/flix_cloud/file_locations.rb