Class: ConfigTemplates::Criteria::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/config_templates/criteria/path.rb

Instance Method Summary collapse

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