Class: Hyde::Probe
Overview
Test probe. Also base for all "reactive" nodes.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(path, parent:) ⇒ Probe
constructor
A new instance of Probe.
-
#process(request) ⇒ Boolean
Method callback on successful request navigation.
Methods inherited from Node
Constructor Details
#initialize(path, parent:) ⇒ Probe
Returns a new instance of Probe.
41 42 43 |
# File 'lib/hyde/probe.rb', line 41 def initialize(path, parent:) super(path, parent: parent) end |
Instance Attribute Details
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
45 46 47 |
# File 'lib/hyde/probe.rb', line 45 def properties @properties end |
Instance Method Details
#process(request) ⇒ Boolean
Method callback on successful request navigation. Throws an error upon reaching the path. This behaviour should only be used internally.
53 54 55 56 57 58 59 60 |
# File 'lib/hyde/probe.rb', line 53 def process(request) return reject(request) unless request.path.match?(/^\/?$/) raise StandardError, <<~STREND probe reached #{request.splat.inspect}, #{request.param.inspect} #{request.pretty_inspect} STREND end |