Class: Argo::ConstraintProcessor
- Inherits:
-
Object
- Object
- Argo::ConstraintProcessor
- Extended by:
- Forwardable
- Defined in:
- lib/argo/constraint_processor.rb
Constant Summary collapse
- NON_CONSTRAINT_PROPERTIES =
%w[ description items type ]
Instance Method Summary collapse
-
#initialize(dereferencer) ⇒ ConstraintProcessor
constructor
A new instance of ConstraintProcessor.
- #process(hash) ⇒ Object
Constructor Details
#initialize(dereferencer) ⇒ ConstraintProcessor
Returns a new instance of ConstraintProcessor.
13 14 15 |
# File 'lib/argo/constraint_processor.rb', line 13 def initialize(dereferencer) @dereferencer = dereferencer end |
Instance Method Details
#process(hash) ⇒ Object
17 18 19 20 21 |
# File 'lib/argo/constraint_processor.rb', line 17 def process(hash) process_hash( hash.reject { |k, _| NON_CONSTRAINT_PROPERTIES.include?(k) } ) end |