Module: EncodingDotCom::AttributeRestrictionsIpod

Defined in:
lib/encoding_dot_com/attribute_restrictions.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#validate_sizeObject



12
13
14
15
16
17
# File 'lib/encoding_dot_com/attribute_restrictions.rb', line 12

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