Class: Themis::AR::ValidationSet
- Inherits:
-
Struct
- Object
- Struct
- Themis::AR::ValidationSet
- Defined in:
- lib/themis/ar/validation_set.rb
Overview
Used to store options about validation sets on every single ActiveRecord model class.
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#default ⇒ Object
Returns the value of attribute default.
-
#module ⇒ Object
Returns the value of attribute module.
-
#name ⇒ Object
Returns the value of attribute name.
-
#nested ⇒ Object
Returns the value of attribute nested.
Instance Method Summary collapse
-
#initialize(hash) ⇒ ValidationSet
constructor
Redefine ‘new` to initialize structure with hash.
Constructor Details
#initialize(hash) ⇒ ValidationSet
Redefine ‘new` to initialize structure with hash
7 8 9 10 |
# File 'lib/themis/ar/validation_set.rb', line 7 def initialize(hash) members = self.class.members.map!(&:to_sym) super(*hash.values_at(*members)) end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block
5 6 7 |
# File 'lib/themis/ar/validation_set.rb', line 5 def block @block end |
#default ⇒ Object
Returns the value of attribute default
5 6 7 |
# File 'lib/themis/ar/validation_set.rb', line 5 def default @default end |
#module ⇒ Object
Returns the value of attribute module
5 6 7 |
# File 'lib/themis/ar/validation_set.rb', line 5 def module @module end |
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/themis/ar/validation_set.rb', line 5 def name @name end |
#nested ⇒ Object
Returns the value of attribute nested
5 6 7 |
# File 'lib/themis/ar/validation_set.rb', line 5 def nested @nested end |