Class: PleaseValidate::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/please_validate/request.rb

Instance Method Summary collapse

Constructor Details

#initialize(arguments) ⇒ Request

Takes an array of requested items and passes them to the validator



6
7
8
9
# File 'lib/please_validate/request.rb', line 6

def initialize(arguments)
  @files = build_file_list_from_request arguments
  @result = PleaseValidate::Validator.files(files)
end

Instance Method Details

#filesObject

Returns all files included in the validation request



17
18
19
# File 'lib/please_validate/request.rb', line 17

def files
  @files
end

#resultObject

Returns the validation result



12
13
14
# File 'lib/please_validate/request.rb', line 12

def result
  @result
end