Sha256: c299089fcca4afe08ee3e122b17a21dfc8f3a21706c561115aa6f6db4c67c45e

Contents?: true

Size: 382 Bytes

Versions: 9

Compression:

Stored size: 382 Bytes

Contents

class FlixCloud::File < FlixCloud::Record

  attr_accessor :url, :size, :width, :height, :duration, :cost

  record_column :parameters, 'Parameters'

  def valid?
    self.errors = []

    unless url
      self.errors << "url is required"
    end

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

    errors.empty?
  end

end

Version data entries

9 entries across 9 versions & 3 rubygems

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