Module: ValidationGroup::Util
- Defined in:
- lib/validation_group.rb
Class Method Summary collapse
-
.current_and_ancestors(current) ⇒ Object
Return array consisting of current and its superclasses down to and including base_class.
Class Method Details
.current_and_ancestors(current) ⇒ Object
Return array consisting of current and its superclasses down to and including base_class.
131 132 133 134 135 136 137 138 139 140 |
# File 'lib/validation_group.rb', line 131 def self.current_and_ancestors(current) returning [] do |klasses| klasses << current root = current.base_class until current == root current = current.superclass klasses << current end end end |