Module: Gumdrop::Util::ViewHelpers
- Included in:
- Generator::DSL, RenderContext
- Defined in:
- lib/gumdrop/util/view_helpers.rb
Instance Method Summary collapse
- #config ⇒ Object
- #data ⇒ Object
- #gumdrop_version ⇒ Object
- #hidden(&block) ⇒ Object
- #markdown(source) ⇒ Object
- #textile(source) ⇒ Object
Instance Method Details
#config ⇒ Object
28 29 30 |
# File 'lib/gumdrop/util/view_helpers.rb', line 28 def config site.config end |
#data ⇒ Object
32 33 34 |
# File 'lib/gumdrop/util/view_helpers.rb', line 32 def data site.data end |
#gumdrop_version ⇒ Object
36 37 38 |
# File 'lib/gumdrop/util/view_helpers.rb', line 36 def gumdrop_version ::Gumdrop::VERSION end |
#hidden(&block) ⇒ Object
6 7 8 |
# File 'lib/gumdrop/util/view_helpers.rb', line 6 def hidden(&block) #no-op end |
#markdown(source) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/gumdrop/util/view_helpers.rb', line 10 def markdown(source) eng= Gumdrop::Renderer.for 'markdown' unless eng.nil? eng.new(source).render else raise StandardError, "Markdown is not available: Include a Markdown engine in your Gemfile!" end end |
#textile(source) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/gumdrop/util/view_helpers.rb', line 19 def textile(source) eng= Gumdrop::Renderer.for 'textile' unless eng.nil? eng.new(source).render else raise StandardError, "Textile is not available: Include a Textile engine in your Gemfile!" end end |