Class: Pingdom::Validator
- Inherits:
-
Object
- Object
- Pingdom::Validator
- Defined in:
- lib/pingdom/validator.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#permit ⇒ Object
readonly
Returns the value of attribute permit.
Instance Method Summary collapse
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
4 5 6 |
# File 'lib/pingdom/validator.rb', line 4 def input @input end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'lib/pingdom/validator.rb', line 4 def params @params end |
#permit ⇒ Object (readonly)
Returns the value of attribute permit.
4 5 6 |
# File 'lib/pingdom/validator.rb', line 4 def permit @permit end |
Instance Method Details
#validate(input:, permit:, params:) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/pingdom/validator.rb', line 6 def validate input: , permit: , params: @input= input.first || {} @permit=permit @params=params params.merge(format) end |