Module: EncodingDotCom::AttributeRestrictionsZune

Defined in:
lib/encoding_dot_com/attribute_restrictions.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#validate_sizeObject



3
4
5
6
7
8
# File 'lib/encoding_dot_com/attribute_restrictions.rb', line 3

def validate_size
  allowed_sizes = %w{320x120 320x180 320x0 0x120 0x180}
  unless size.nil? || allowed_sizes.include?(size)
    raise IllegalFormatAttribute.new("Size can only be one of #{allowed_sizes.join(',')} but was #{size}")
  end
end