Sha256: 94f7ee0f5c80ce77335944408f4a5c1088e8144dc8eaf27590762610f9192766
Contents?: true
Size: 848 Bytes
Versions: 12
Compression:
Stored size: 848 Bytes
Contents
module Brief class Briefcase module Documentation class ModelDoc def initialize(path) @content = Pathname(path).read end def content @content end def rendered ::GitHub::Markdown.render_gfm(content) end end def render_documentation(include_all=false) list = include_all ? Brief::Model.classes : model_classes list.reduce({}.to_mash) do |memo, klass| docs = klass.to_documentation rescue {} memo[klass.type_alias] = docs unless docs.empty? memo end end def schema_map(include_all=false) list = include_all ? Brief::Model.classes : model_classes list.map(&:to_schema) .reduce({}.to_mash) {|m, k| m[k[:type_alias]] = k; m } end end end end
Version data entries
12 entries across 12 versions & 1 rubygems