Class: ConfigTemplates::Criteria::Path
- Inherits:
-
Object
- Object
- ConfigTemplates::Criteria::Path
- Defined in:
- lib/config_templates/criteria/path.rb
Instance Method Summary collapse
- #filter(hash) ⇒ Object
-
#initialize(path) ⇒ Path
constructor
A new instance of Path.
Constructor Details
#initialize(path) ⇒ Path
Returns a new instance of Path.
3 4 5 |
# File 'lib/config_templates/criteria/path.rb', line 3 def initialize(path) @path = path end |
Instance Method Details
#filter(hash) ⇒ Object
7 8 9 |
# File 'lib/config_templates/criteria/path.rb', line 7 def filter(hash) hash.key?(@path) ? { @path => hash[@path] } : {} end |