class SDLValidator::Validator

Attributes

author[RW]
created[RW]
discussions_to[RW]

replace - with _

implementation[RW]
layer[RW]
replaces[RW]
requires[RW]
resolution[RW]
review_period_end[RW]

replace - with _

sip[RW]
status[RW]
superseded_by[RW]

replace - with _

title[RW]
updated[RW]

Public Class Methods

new(opts = {}) click to toggle source
Calls superclass method
# File lib/sdl_validator/validator.rb, line 5
def initialize(opts = {})
  # ruby does not allow method with -
  # replaces - with _
  opts.keys.each do |key|
    raise("#{key} incude _ which is not allowed") if key.to_s.match(/_/)
    if key.to_s.match(/-/)
      new_key = opts.keys.last.to_s.gsub('-','_')
      opts[new_key] = opts.delete key
    end
  end
  super(opts)
end