Method: Microformats::Calendar#run
- Defined in:
- lib/calendar.rb
#run(opts = {}, &block) ⇒ Object
You can directly initialize and run this class, but it’s easier to use the Microformats::Helpers#vcalendar helper method.
OPTIONS:
-
:tag - The HTML wrapper element (defaults to :div)
-
Any other passed options will be treated as HTML attributes.
16 17 18 19 20 21 22 |
# File 'lib/calendar.rb', line 16 def run(opts = {}, &block) opts[:class] = combine_class_names('vcalendar', opts[:class]) opts[:tag] ||= :div concat_tag(opts) do block.call(self) end end |