Sha256: 5d17f00cc32a127ae03f8d47d8104841af302acfbdb70f21de2e23b76bbe3268

Contents?: true

Size: 469 Bytes

Versions: 1

Compression:

Stored size: 469 Bytes

Contents

module DSLize
  module Formatter
    
    class Base
      attr_accessor :objects
      attr_accessor :superclasses
      
      def initialize
        self.objects = DSLize.objects
        self.superclasses = DSLize.superclasses
      end
      
      protected
      def get_subclasses(type)
        superclasses.select { |k,v| v.to_s == type.to_s }.keys.map { |k| (!objects[k][:abstract] ? [k] : []) + get_subclasses(k) }.flatten
      end
    end
    
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dslize-0.0.5 lib/dslize/formatter/formatter.rb