Class: Xpect::Every
- Inherits:
-
Object
- Object
- Xpect::Every
- Defined in:
- lib/xpect/every.rb
Overview
TODO: Add tests
Instance Method Summary collapse
- #conform!(data:, path: []) ⇒ Object
-
#initialize(item_spec) ⇒ Every
constructor
A new instance of Every.
Constructor Details
#initialize(item_spec) ⇒ Every
Returns a new instance of Every.
4 5 6 |
# File 'lib/xpect/every.rb', line 4 def initialize(item_spec) @item_spec = item_spec end |
Instance Method Details
#conform!(data:, path: []) ⇒ Object
8 9 10 11 12 |
# File 'lib/xpect/every.rb', line 8 def conform!(data:, path: []) data.map do |val| Xpect::Type.process(@item_spec, @item_spec, val, path) end end |