Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Commit

Permalink
Correctly configure yard and fix the :row_header docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
pupeno committed Jan 17, 2012
1 parent 5e001e6 commit 15cdf4e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -3,3 +3,5 @@
.bundle
Gemfile.lock
pkg/*
.yardoc
doc
1 change: 1 addition & 0 deletions .yardopts
@@ -0,0 +1 @@
--markup markdown lib/**/*.rb
8 changes: 8 additions & 0 deletions README.rdoc
Expand Up @@ -140,6 +140,14 @@ Inside your Gemfile:

gem 'table_builder', '0.0.3', :git => 'git://github.com/jchunky/table_builder.git'

== Contributing

Document any new options and verify the documentation looks correct by running:

yard server --reload

and going to http://localhos:8808

== Contributors

Thanks to Petrik de Heus and Sean Dague.
Expand Down
9 changes: 5 additions & 4 deletions lib/table_builder/calendar_helper.rb
@@ -1,13 +1,14 @@
module CalendarHelper
# Generates a calendar (as a table) for an array of objects placing each of them on the corresponding date.
#
# TODO: fully document this method, the current documentation is far from done.
# **TODO: fully document this method, the current documentation is far from done.**
#
# @param [Hash] options extra options
#
# :row_header if true, each row will have an extra cell at the beginning, as a row header. A typical usage would be
# to output week numbers. When the block is called, it will get the date that would normally be passed to the
# first day of the week (to give you some context) and a nil list of objects (and that's how you recognize it as
# a header, because empty days get an empty array, not nil).
# to output week numbers. When the block is called, it will get the date that would normally be passed to the
# first day of the week (to give you some context) and a nil list of objects (and that's how you recognize it as
# a header, because empty days get an empty array, not nil).
def calendar_for(objects, *args, &block)
raise ArgumentError, "Missing block" unless block_given?
options = args.last.is_a?(Hash) ? args.pop : {}
Expand Down
1 change: 1 addition & 0 deletions table_builder.gemspec
Expand Up @@ -21,4 +21,5 @@ Gem::Specification.new do |s|
# specify any dependencies here; for example:
# s.add_development_dependency "rspec"
# s.add_runtime_dependency "rest-client"
s.add_development_dependency "yard"
end

0 comments on commit 15cdf4e

Please sign in to comment.