module TokyoMetro::Document
ドキュメントの生成に関する機能を格納する名前空間
Public Class Methods
yard( verbose: true )
click to toggle source
YARD によるドキュメントを生成するメソッド @return [nil]
# File lib/tokyo_metro/document.rb, line 6 def self.yard( verbose: true ) Dir.chdir( "#{ ::Rails.root }/app" ) ::MakeYardoc::process( make_yardoc: true , copy_css: true , files: "**\\**.rb" , title: title_default( "\[app\]" ) , verbose: verbose , embed_mixins: true ) Dir.chdir( "#{ ::Rails.root }/lib" ) ::MakeYardoc::process( make_yardoc: true , copy_css: true , files: "**\\**.rb" , title: title_default( "\[lib\]" ) , verbose: verbose , embed_mixins: true ) end
Private Class Methods
title_default( addition = nil )
click to toggle source
# File lib/tokyo_metro/document.rb, line 17 def title_default( addition = nil ) str = ::String.new str << "Ruby for Rails" str << " - " if addition.blank? str << "Web programming" else str << addition end str << " " time = ::Time.now.strftime( "%Y.%m.%d %H:%M" ) str << "(as of #{ time })" str end