Class: ParamsReady::Reporter
- Inherits:
-
AbstractReporter
- Object
- AbstractReporter
- ParamsReady::Reporter
- Defined in:
- lib/params_ready/result.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #child_ok?(path) ⇒ Boolean
-
#initialize(name, parent) ⇒ Reporter
constructor
A new instance of Reporter.
- #ok? ⇒ Boolean
- #report_error(path, err) ⇒ Object
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
#name ⇒ Object (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
101 102 103 |
# File 'lib/params_ready/result.rb', line 101 def child_ok?(path) @parent.child_ok?(full_path(path)) end |
#ok? ⇒ 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 |