Class: Pingdom::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/pingdom/validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#inputObject (readonly)

Returns the value of attribute input.



4
5
6
# File 'lib/pingdom/validator.rb', line 4

def input
  @input
end

#paramsObject (readonly)

Returns the value of attribute params.



4
5
6
# File 'lib/pingdom/validator.rb', line 4

def params
  @params
end

#permitObject (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