Class: IceNine::Freezer

Inherits:
Object show all
Defined in:
lib/active_scaffold/extensions/ice_nine.rb

Defined Under Namespace

Classes: ActiveScaffold, ObjectWithExclussion

Class Method Summary collapse

Class Method Details

.find(name) ⇒ Object



3
4
5
6
7
8
# File 'lib/active_scaffold/extensions/ice_nine.rb', line 3

def self.find(name)
  freezer = name.split('::').reduce(self) do |mod, const|
    mod.const_lookup(const) or break mod # rubocop:disable Style/AndOr
  end
  freezer if freezer < self # only return a descendant freezer
end