Class: Hermod::Validators::Attributes

Inherits:
Base
  • Object
show all
Defined in:
lib/hermod/validators/attributes.rb

Overview

Checks the attributes are in a list of allowed attributes

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#valid?

Constructor Details

#initialize(allowed_attributes) ⇒ Attributes

Public: Sets up the list of allowed attributes



10
11
12
# File 'lib/hermod/validators/attributes.rb', line 10

def initialize(allowed_attributes)
  @allowed_attributes = allowed_attributes
end

Instance Attribute Details

#allowed_attributesObject (readonly)

Returns the value of attribute allowed_attributes.



7
8
9
# File 'lib/hermod/validators/attributes.rb', line 7

def allowed_attributes
  @allowed_attributes
end