Class: Corkscrews::Validate::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/corkscrews/validate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#checksObject

Returns the value of attribute checks

Returns:

  • (Object)

    the current value of checks



17
18
19
# File 'lib/corkscrews/validate.rb', line 17

def checks
  @checks
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/corkscrews/validate.rb', line 18

def ok?
  checks.all? { |check| check[:ok] }
end

#to_hObject



22
23
24
# File 'lib/corkscrews/validate.rb', line 22

def to_h
  { ok: ok?, checks: sanitize(checks) }
end