Class: ParamsReady::Reporter

Inherits:
AbstractReporter show all
Defined in:
lib/params_ready/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractReporter

#error!, #for_child, #full_path

Constructor Details

#initialize(name, parent) ⇒ Reporter

Returns a new instance of Reporter.



92
93
94
95
# File 'lib/params_ready/result.rb', line 92

def initialize(name, parent)
  super name
  @parent = parent
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



90
91
92
# File 'lib/params_ready/result.rb', line 90

def name
  @name
end

Instance Method Details

#child_ok?(path) ⇒ Boolean

Returns:

  • (Boolean)


101
102
103
# File 'lib/params_ready/result.rb', line 101

def child_ok?(path)
  @parent.child_ok?(full_path(path))
end

#ok?Boolean

Returns:

  • (Boolean)


97
98
99
# File 'lib/params_ready/result.rb', line 97

def ok?
  child_ok?(nil)
end

#report_error(path, err) ⇒ Object



105
106
107
# File 'lib/params_ready/result.rb', line 105

def report_error(path, err)
  @parent.report_error(full_path(path), err)
end