Sha256: 3c131d40b341aab00c87104fbea1c58e55cfbc311649b4e3f3968efc1d8ce097

Contents?: true

Size: 346 Bytes

Versions: 1

Compression:

Stored size: 346 Bytes

Contents

module Defekt
  class Base
    include Assertions

    [:before, :after].each { |methot| define_method(methot) {} }

    def self.children
      @children ||= []
    end

    def self.descendants
      children + children.map(&:descendants).flatten
    end

    private

    def self.inherited(klass)
      children.push(klass)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
defekt-0.0.3 lib/defekt/base.rb