Module: WhiskeyDisk::Config::ScopeHelper
- Included in:
- EnvironmentScopeFilter, ProjectScopeFilter
- Defined in:
- lib/whiskey_disk/config/filters/modules/scope_helper.rb
Instance Method Summary collapse
Instance Method Details
#repository_depth(data, depth = 0) ⇒ Object
4 5 6 7 8 |
# File 'lib/whiskey_disk/config/filters/modules/scope_helper.rb', line 4 def repository_depth(data, depth = 0) raise 'no repository found' unless data.respond_to?(:has_key?) return depth if data.has_key?('repository') repository_depth(data.values.first, depth + 1) end |