class EipValidator::Validator
Attributes
category[RW]
created[RW]
discussions_to[RW]
replace - with _
eip[RW]
layer[RW]
replaces[RW]
requires[RW]
resolution[RW]
review_period_end[RW]
replace - with _
status[RW]
superseded_by[RW]
replace - with _
title[RW]
type[RW]
updated[RW]
Public Class Methods
new(opts = {})
click to toggle source
Calls superclass method
# File lib/eip_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