class Documentary::DocblockCollection

Attributes

collection[R]

Public Class Methods

new() click to toggle source
# File lib/documentary/docblock_collection.rb, line 8
def initialize
  @collection = []
end

Public Instance Methods

endpoints() click to toggle source
# File lib/documentary/docblock_collection.rb, line 20
def endpoints
  fetch_subset :endpoint
end
resources() click to toggle source
# File lib/documentary/docblock_collection.rb, line 16
def resources
  fetch_subset :resource
end
title_blocks() click to toggle source
# File lib/documentary/docblock_collection.rb, line 12
def title_blocks
  fetch_subset :title_block
end

Private Instance Methods

fetch_subset(type) click to toggle source
# File lib/documentary/docblock_collection.rb, line 28
def fetch_subset(type)
  collection.select { |docblock| docblock.type == type }.sort_by { |block| block.order }
end