Class: Class

Inherits:
Object show all
Defined in:
lib/gooddata/extensions/class.rb

Overview

Copyright (c) 2010-2017 GoodData Corporation. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree.

Instance Method Summary collapse

Instance Method Details

#descendantsObject



10
11
12
13
14
# File 'lib/gooddata/extensions/class.rb', line 10

def descendants
  ObjectSpace.each_object(Class).select do |klass|
    klass < self
  end
end

#short_nameObject



6
7
8
# File 'lib/gooddata/extensions/class.rb', line 6

def short_name
  name.split('::').last
end