Sha256: 9ccfb997cd1397b82c32912490deeae8856cca9fdc3179da9b6398c2e002df12

Contents?: true

Size: 933 Bytes

Versions: 15

Compression:

Stored size: 933 Bytes

Contents

module Doc
  class Configurator
    class << self
      def inherited(subclass)
        RootConfig.configurator subclass.name.underscore.split('/').last, subclass
      end

      def default_config_key(value = nil)
        @default_config_key = value.to_sym if value
        @default_config_key || :default
      end
    end

    attr_reader :documentor, :config
    def initialize(documentor, *arguments, &block)
      @documentor = documentor
      @config = ConfigObject.new(self.class.default_config_key, *arguments, &block)
    end

    abstract_method :configure, :tasks

  private

    PARSABLE_EXTENSIONS_GLOB = "{#{%w[rb  c m C M cc CC mm MM c++ cxx cpp  h H hh HH hm h++ hpp hxx  y].join(',')}}"

    def sources_dir
      documentor.sources_dir.tap(&:mkpath)
    end

    def builder(options)
      Builder.new(documentor, options)
    end

    def merger(options)
      Merger.new(documentor, options)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
doc-0.5.0 lib/doc/configurator.rb
doc-0.4.1 lib/doc/configurator.rb
doc-0.4.0 lib/doc/configurator.rb
doc-0.3.0 lib/doc/configurator.rb
doc-0.2.8 lib/doc/configurator.rb
doc-0.2.7 lib/doc/configurator.rb
doc-0.2.6 lib/doc/configurator.rb
doc-0.2.5 lib/doc/configurator.rb
doc-0.2.4 lib/doc/configurator.rb
doc-0.2.3 lib/doc/configurator.rb
doc-0.2.2 lib/doc/configurator.rb
doc-0.2.1 lib/doc/configurator.rb
doc-0.2.0 lib/doc/configurator.rb
doc-0.1.0 lib/doc/configurator.rb
doc-0.0.1 lib/doc/configurator.rb