SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
pre-show interlude
RDoc
GEMS of OCEANIA


 what basics do we need for a newcomer
       to publish their first gem?
the Perils of Documentation
skills

technical skills (see: this preso),
writing skills (sorry, cant help)
time

  writing documentation and
keeping it up-to-date takes time
change

code and architecture changes, domain changes
    e.g. wikis and .docs get dusty & crufty
RDoc
let us see how RDoc addresses these perils
skills

theyre just Ruby comments, with a few formatting
        tags it autolinks, autogenerates, etc.
  Your mum could RDoc (maybe, ok prolly not)
for those writing skills...
time

theyre just comments. You dont need to document the
   self-explanatory, but chances are youre already
            commenting tricky bits of code.
      Why not use that to create reference docs?
change

its in your code, therefore the chance of it
         staying up-to-date is high
Demo I

running RDoc on a simple file:
     rdoc somefile.rb
RDocTask
require 'rake/rdoctask'

Rake::RDocTask.new do |rdoc|
     files = ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb',
              'doc/**/*.rdoc', 'test/*.rb']
     rdoc.rdoc_files.add(files)
     rdoc.main = quot;READMEquot; # page to start on
     rdoc.title = quot;My App's Documentationquot;
     rdoc.rdoc_dir = 'doc' # rdoc output folder
     rdoc.options << '--line-numbers' << '--inline-source'
end
Demo II

creating a Rakefile with an RDocTask, then
seeing what Rake tasks it creates, and finally
     running rake: rake -T; rake doc
Rails
$ rake -T doc
rake doc:app               #   Build the app HTML Files
rake doc:clobber_app       #   Remove rdoc products
rake doc:clobber_plugins   #   Remove plugin documentation
rake doc:clobber_rails     #   Remove rdoc products
rake doc:plugins           #   Generate documation for all installed plugins
rake doc:rails             #   Build the rails HTML Files
rake doc:reapp             #   Force a rebuild of the RDOC files
rake doc:rerails           #   Force a rebuild of the RDOC files
Demo III

generating docs for your Rails app:
 rake doc:app; rake doc:api
Sexiness
Demo IV

 using Evan Weavers Allison RDoc template
My suggestion: use that and customise the CSS.
interlude
Formatting
= Level One Heading
   == Level Two Heading
etc.




             headings!
# Here’s a list:
#
# * Item 1
# * Item 2




                   lists!
# Add another:
#
# 1. Item 1
# 2. Item 2




                 lists again!
:nodoc:



Prevent RDoc from documenting a class, method or module.
:nodoc:all



 Prevent RDoc from documenting a class or
    module and all of the bits within it.
:doc:



Force RDoc to include a class, module or method
            in the documentation.
def fred      # :yields: index, position
    ...
    yield line, address




 RDoc automatically tries to figure out what your
    method yields from the variable names.
    Using :yields: you can override this.
post-show interlude
Thanks!




      Tim Lucas
      toolmantim.com

Más contenido relacionado

Destacado

TUBO DIGESTIVO I
TUBO DIGESTIVO ITUBO DIGESTIVO I
TUBO DIGESTIVO I
elgrupo13
 
Riñón y testículo
Riñón y testículoRiñón y testículo
Riñón y testículo
elgrupo13
 
PATOLOGÍA DE CÉRVIX Y ENDOMETRIO
PATOLOGÍA DE CÉRVIX Y ENDOMETRIOPATOLOGÍA DE CÉRVIX Y ENDOMETRIO
PATOLOGÍA DE CÉRVIX Y ENDOMETRIO
elgrupo13
 
ENFERMEDADES DEL TROFOBLASTO Y DE LA GLANDULA MAMARIA
ENFERMEDADES DEL TROFOBLASTO Y DE LA GLANDULA MAMARIAENFERMEDADES DEL TROFOBLASTO Y DE LA GLANDULA MAMARIA
ENFERMEDADES DEL TROFOBLASTO Y DE LA GLANDULA MAMARIA
elgrupo13
 
HIGADO Y VIAS BILIARES
HIGADO Y VIAS BILIARESHIGADO Y VIAS BILIARES
HIGADO Y VIAS BILIARES
elgrupo13
 
Riñón y testículo
Riñón y testículoRiñón y testículo
Riñón y testículo
elgrupo13
 
DESNUTRICION
DESNUTRICIONDESNUTRICION
DESNUTRICION
elgrupo13
 
PRÓSTATA Y PENE
PRÓSTATA Y PENEPRÓSTATA Y PENE
PRÓSTATA Y PENE
elgrupo13
 

Destacado (20)

El poema clon
El poema clonEl poema clon
El poema clon
 
TUBO DIGESTIVO I
TUBO DIGESTIVO ITUBO DIGESTIVO I
TUBO DIGESTIVO I
 
UOD Usabilidade
UOD UsabilidadeUOD Usabilidade
UOD Usabilidade
 
Introduction to RDoc
Introduction to RDocIntroduction to RDoc
Introduction to RDoc
 
Riñón y testículo
Riñón y testículoRiñón y testículo
Riñón y testículo
 
NYSERDA PROGRAMS: $aving Home Energy Dollars
NYSERDA PROGRAMS: $aving Home Energy DollarsNYSERDA PROGRAMS: $aving Home Energy Dollars
NYSERDA PROGRAMS: $aving Home Energy Dollars
 
3rd Grade Science--Mrs. Stanley's Class
3rd Grade Science--Mrs. Stanley's Class3rd Grade Science--Mrs. Stanley's Class
3rd Grade Science--Mrs. Stanley's Class
 
En la madre 2
En la madre 2En la madre 2
En la madre 2
 
Violencia participativa en los videojuegos: la persona como protagonista
Violencia participativa en los videojuegos: la persona como protagonistaViolencia participativa en los videojuegos: la persona como protagonista
Violencia participativa en los videojuegos: la persona como protagonista
 
El poema clon.
El poema clon.El poema clon.
El poema clon.
 
Vida de San Agustín Roscelli
Vida de San Agustín RoscelliVida de San Agustín Roscelli
Vida de San Agustín Roscelli
 
PATOLOGÍA DE CÉRVIX Y ENDOMETRIO
PATOLOGÍA DE CÉRVIX Y ENDOMETRIOPATOLOGÍA DE CÉRVIX Y ENDOMETRIO
PATOLOGÍA DE CÉRVIX Y ENDOMETRIO
 
3rd Grade Science--Mrs. Kier's Class
3rd Grade Science--Mrs. Kier's Class3rd Grade Science--Mrs. Kier's Class
3rd Grade Science--Mrs. Kier's Class
 
Material Modelagem - Prof. Marcos Alexandruk
Material Modelagem - Prof. Marcos AlexandrukMaterial Modelagem - Prof. Marcos Alexandruk
Material Modelagem - Prof. Marcos Alexandruk
 
ENFERMEDADES DEL TROFOBLASTO Y DE LA GLANDULA MAMARIA
ENFERMEDADES DEL TROFOBLASTO Y DE LA GLANDULA MAMARIAENFERMEDADES DEL TROFOBLASTO Y DE LA GLANDULA MAMARIA
ENFERMEDADES DEL TROFOBLASTO Y DE LA GLANDULA MAMARIA
 
HIGADO Y VIAS BILIARES
HIGADO Y VIAS BILIARESHIGADO Y VIAS BILIARES
HIGADO Y VIAS BILIARES
 
Riñón y testículo
Riñón y testículoRiñón y testículo
Riñón y testículo
 
Neumonia
NeumoniaNeumonia
Neumonia
 
DESNUTRICION
DESNUTRICIONDESNUTRICION
DESNUTRICION
 
PRÓSTATA Y PENE
PRÓSTATA Y PENEPRÓSTATA Y PENE
PRÓSTATA Y PENE
 

Similar a Introduction to RDoc

Similar a Introduction to RDoc (20)

Dev streams2
Dev streams2Dev streams2
Dev streams2
 
Building Application with Ruby On Rails Framework
Building Application with Ruby On Rails FrameworkBuilding Application with Ruby On Rails Framework
Building Application with Ruby On Rails Framework
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
RoR guide_p1
RoR guide_p1RoR guide_p1
RoR guide_p1
 
rails.html
rails.htmlrails.html
rails.html
 
rails.html
rails.htmlrails.html
rails.html
 
Docker Introduction.pdf
Docker Introduction.pdfDocker Introduction.pdf
Docker Introduction.pdf
 
How to dockerize rails application compose and rails tutorial
How to dockerize rails application compose and rails tutorialHow to dockerize rails application compose and rails tutorial
How to dockerize rails application compose and rails tutorial
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails Devs
 
Docker for Deep Learning (Andrea Panizza)
Docker for Deep Learning (Andrea Panizza)Docker for Deep Learning (Andrea Panizza)
Docker for Deep Learning (Andrea Panizza)
 
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth RushgroveThe Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
 
Docker and SDL Web/Tridion - SDL UK User Group April 2017
Docker and SDL Web/Tridion - SDL UK User Group April 2017Docker and SDL Web/Tridion - SDL UK User Group April 2017
Docker and SDL Web/Tridion - SDL UK User Group April 2017
 
Ruby Meets Cocoa
Ruby Meets CocoaRuby Meets Cocoa
Ruby Meets Cocoa
 
Code Documentation. That ugly thing...
Code Documentation. That ugly thing...Code Documentation. That ugly thing...
Code Documentation. That ugly thing...
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
 
Tips pour sécuriser ses conteneurs docker/podman
Tips pour sécuriser ses conteneurs docker/podmanTips pour sécuriser ses conteneurs docker/podman
Tips pour sécuriser ses conteneurs docker/podman
 
Docker Essentials Workshop— Innovation Labs July 2020
Docker Essentials Workshop— Innovation Labs July 2020Docker Essentials Workshop— Innovation Labs July 2020
Docker Essentials Workshop— Innovation Labs July 2020
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peek
 
ROS Course Slides Course 2.pdf
ROS Course Slides Course 2.pdfROS Course Slides Course 2.pdf
ROS Course Slides Course 2.pdf
 

Más de Tim Lucas

Improving performance of iphone.news.com.au
Improving performance of iphone.news.com.auImproving performance of iphone.news.com.au
Improving performance of iphone.news.com.au
Tim Lucas
 
Matt Allen - Unfuddle your bugs
Matt Allen - Unfuddle your bugsMatt Allen - Unfuddle your bugs
Matt Allen - Unfuddle your bugs
Tim Lucas
 

Más de Tim Lucas (10)

Introducing... Bananajour!
Introducing... Bananajour!Introducing... Bananajour!
Introducing... Bananajour!
 
RORO May Lightning Preso Madness
RORO May Lightning Preso MadnessRORO May Lightning Preso Madness
RORO May Lightning Preso Madness
 
Sinatra
SinatraSinatra
Sinatra
 
Cucumbers & Factory Girls
Cucumbers & Factory GirlsCucumbers & Factory Girls
Cucumbers & Factory Girls
 
Introducing me, and Ruby on Rails
Introducing me, and Ruby on RailsIntroducing me, and Ruby on Rails
Introducing me, and Ruby on Rails
 
Developing for iPhone
Developing for iPhoneDeveloping for iPhone
Developing for iPhone
 
Just Built It - Introduction to Ruby on Rails
Just Built It - Introduction to Ruby on RailsJust Built It - Introduction to Ruby on Rails
Just Built It - Introduction to Ruby on Rails
 
Improving performance of iphone.news.com.au
Improving performance of iphone.news.com.auImproving performance of iphone.news.com.au
Improving performance of iphone.news.com.au
 
Matthew Landauer - Open Australia
Matthew Landauer - Open AustraliaMatthew Landauer - Open Australia
Matthew Landauer - Open Australia
 
Matt Allen - Unfuddle your bugs
Matt Allen - Unfuddle your bugsMatt Allen - Unfuddle your bugs
Matt Allen - Unfuddle your bugs
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Introduction to RDoc