Method: Wikiwhat::Page#run
- Defined in:
- lib/wikiwhat/page.rb
#run(hash) ⇒ Object
Iterates over the options hash.
hash - options hash
Runs the appropriate method based on the options hash.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/wikiwhat/page.rb', line 36 def run(hash) hash.each do |key, value| case key when:img_list image_list when:header header(value) when:refs ref_list when:sidebar_img when:num_paragraphs paragraphs(value) when:sidebar when:sidebar_thumb (:width => value[:width], :height => value[:height]) end end end |