Sha256: 83d5aecaab7dc709f74e000d3ca438ecd2abb29eee83e68eac87bc2b6bdc721e

Contents?: true

Size: 689 Bytes

Versions: 7

Compression:

Stored size: 689 Bytes

Contents

require_relative 'puppet_task'

module PuppetStrings::Markdown
  module PuppetTasks

    # @return [Array] list of classes
    def self.in_tasks
      arr = YARD::Registry.all(:puppet_task).sort_by!(&:name).map!(&:to_hash)
      arr.map! { |a| PuppetStrings::Markdown::PuppetTask.new(a) }
    end

    def self.contains_private?
      false
    end

    def self.render
      final = in_tasks.length > 0 ? "## Tasks\n\n" : ""
      in_tasks.each do |task|
        final << task.render unless task.private?
      end
      final
    end

    def self.toc_info
      final = ["Tasks"]

      in_tasks.each do |task|
        final.push(task.toc_info)
      end

      final
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
puppet-strings-2.5.0 lib/puppet-strings/markdown/puppet_tasks.rb
puppet-strings-2.4.0 lib/puppet-strings/markdown/puppet_tasks.rb
puppet-strings-2.3.1 lib/puppet-strings/markdown/puppet_tasks.rb
puppet-strings-2.3.0 lib/puppet-strings/markdown/puppet_tasks.rb
puppet-strings-2.2.0 lib/puppet-strings/markdown/puppet_tasks.rb
puppet-strings-2.1.0 lib/puppet-strings/markdown/puppet_tasks.rb
puppet-strings-2.0.0 lib/puppet-strings/markdown/puppet_tasks.rb