Sha256: 8670ee1fff112d078dced67a93cc6fb9ff6d4b0ba7ca4a204a5ba5e342691834

Contents?: true

Size: 237 Bytes

Versions: 14

Compression:

Stored size: 237 Bytes

Contents

class Class
  def inherited(subclass) 
    if superclass.respond_to? :inherited 
      superclass.inherited(subclass) 
    end 
    @subclasses ||= [] 
    @subclasses << subclass 
  end

  def subclasses 
    @subclasses||[]
  end 
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
distil-0.14.5.a lib/distil/subclass-tracker.rb
distil-0.14.4 lib/distil/subclass-tracker.rb
distil-0.14.3 lib/distil/subclass-tracker.rb
distil-0.14.2 lib/distil/subclass-tracker.rb
distil-0.14.2.a lib/distil/subclass-tracker.rb
distil-0.14.1 lib/distil/subclass-tracker.rb
distil-0.14.1.a lib/distil/subclass-tracker.rb
distil-0.14.0 lib/distil/subclass-tracker.rb
distil-0.14.0.i lib/distil/subclass-tracker.rb
distil-0.14.0.h lib/distil/subclass-tracker.rb
distil-0.14.0.g lib/distil/subclass-tracker.rb
distil-0.14.0.d lib/distil/subclass-tracker.rb
distil-0.14.0.c lib/distil/subclass-tracker.rb
distil-0.14.0.b lib/distil/subclass-tracker.rb