Module: Serega::SeregaValidations::CheckAttributeParams::InstanceMethods
- Included in:
- Serega::SeregaValidations::CheckAttributeParams
- Defined in:
- lib/serega/validations/check_attribute_params.rb
Overview
Validations for attribute params instance methods
Instance Attribute Summary collapse
-
#block ⇒ nil, Proc
readonly
Validated attribute block.
-
#name ⇒ Symbol
readonly
Validated attribute name.
-
#opts ⇒ Hash
readonly
Validated attribute options.
Instance Method Summary collapse
-
#initialize(name, opts, block) ⇒ void
Initializes attribute params validator.
-
#validate ⇒ Object
Validates attribute params.
Instance Attribute Details
#block ⇒ nil, Proc (readonly)
Returns validated attribute block.
23 24 25 |
# File 'lib/serega/validations/check_attribute_params.rb', line 23 def block @block end |
#name ⇒ Symbol (readonly)
Returns validated attribute name.
17 18 19 |
# File 'lib/serega/validations/check_attribute_params.rb', line 17 def name @name end |
#opts ⇒ Hash (readonly)
Returns validated attribute options.
20 21 22 |
# File 'lib/serega/validations/check_attribute_params.rb', line 20 def opts @opts end |
Instance Method Details
#initialize(name, opts, block) ⇒ void
Initializes attribute params validator
34 35 36 37 38 |
# File 'lib/serega/validations/check_attribute_params.rb', line 34 def initialize(name, opts, block) @name = name @opts = opts @block = block end |
#validate ⇒ Object
Validates attribute params
43 44 45 46 47 |
# File 'lib/serega/validations/check_attribute_params.rb', line 43 def validate check_name check_opts check_block end |