Class: Detroit::Ronn
- Inherits:
-
Tool
- Object
- Tool
- Detroit::Ronn
- Defined in:
- lib/detroit-ronn.rb
Overview
RONN Tool
Constant Summary collapse
- DEFAULT_DIRECTORY =
Default manpage directoy.
'man'
Instance Attribute Summary collapse
-
#date ⇒ Object
Published date in YYYY-MM-DD format (bottom-center).
-
#folder ⇒ Object
Location of ‘.ronn` files, defaults to `man`.
-
#organization ⇒ Object
Publishing group or individual (bottom-left).
-
#title ⇒ Object
Name of the manual (top-center).
Instance Method Summary collapse
-
#assemble(station, options = {}) ⇒ Object
It’s important to update the manifest before other generators, so this plugs into the :pre_generate phase.
-
#assemble?(station, options = {}) ⇒ Boolean
Assemble on ‘generate` phase.
-
#generate ⇒ Object
Generate man pages.
Instance Attribute Details
#date ⇒ Object
Published date in YYYY-MM-DD format (bottom-center).
26 27 28 |
# File 'lib/detroit-ronn.rb', line 26 def date @date end |
#folder ⇒ Object
Location of ‘.ronn` files, defaults to `man`.
40 41 42 |
# File 'lib/detroit-ronn.rb', line 40 def folder @folder end |
#organization ⇒ Object
Publishing group or individual (bottom-left).
34 35 36 |
# File 'lib/detroit-ronn.rb', line 34 def organization @organization end |
#title ⇒ Object
Name of the manual (top-center).
23 24 25 |
# File 'lib/detroit-ronn.rb', line 23 def title @title end |
Instance Method Details
#assemble(station, options = {}) ⇒ Object
It’s important to update the manifest before other generators, so this plugs into the :pre_generate phase.
85 86 87 88 89 |
# File 'lib/detroit-ronn.rb', line 85 def assemble(station, ={}) case station when :generate then generate end end |
#assemble?(station, options = {}) ⇒ Boolean
Assemble on ‘generate` phase.
77 78 79 80 81 |
# File 'lib/detroit-ronn.rb', line 77 def assemble?(station, ={}) case station when :generate then true end end |
#generate ⇒ Object
TODO:
Can we do this in code instead of shelling out?
Generate man pages.
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/detroit-ronn.rb', line 48 def generate argv = [] argv << %[ronn] argv << %[--date="#{date}"] argv << %[--manual="#{manual}"] argv << %[--organization="#{organiation}"] sh argv.join(' ') # report "" end |