class Yori::Schema::V3::Header

Header: The Header Object follows the structure of the Parameter Object with the following changes:

  1. name MUST NOT be specified, it is given in the corresponding headers map.

  2. in MUST NOT be specified, it is implicitly in header.

  3. All traits that are affected by the location MUST be applicable to a location of header (for example, style).

Public Instance Methods

validate!() click to toggle source
# File lib/yori/schema/v3/header.rb, line 13
def validate!
  %w[name in].each do |field|
    raise Yori::Errors::FieldMustNotBeSpecifiedError, "#{field} of Header Object." if key?(field)
  end
  validate_schema_or_content!
end