Module: ErbHelper
- Included in:
- View
- Defined in:
- lib/soks-view.rb
Overview
This module is used to extend each erb page to provide helper methods
Instance Attribute Summary collapse
-
#author_to_email_conversion ⇒ Object
Returns the value of attribute author_to_email_conversion.
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #file(name) ⇒ Object
-
#file2(name) ⇒ Object
Will refactor this out eventually and merge with above.
- #url(name, view = 'view', query = '') ⇒ Object
Instance Attribute Details
#author_to_email_conversion ⇒ Object
Returns the value of attribute author_to_email_conversion.
30 31 32 |
# File 'lib/soks-view.rb', line 30 def @author_to_email_conversion end |
#description ⇒ Object
Returns the value of attribute description.
29 30 31 |
# File 'lib/soks-view.rb', line 29 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
28 29 30 |
# File 'lib/soks-view.rb', line 28 def name @name end |
Instance Method Details
#file(name) ⇒ Object
37 38 39 |
# File 'lib/soks-view.rb', line 37 def file( name ) "#{root_url}/attachment/#{name}" end |
#file2(name) ⇒ Object
Will refactor this out eventually and merge with above
42 43 44 45 |
# File 'lib/soks-view.rb', line 42 def file2( name ) name = name[1..-1] if name[0,1] == '/' "#{root_url}/#{name.strip}" end |
#url(name, view = 'view', query = '') ⇒ Object
32 33 34 35 |
# File 'lib/soks-view.rb', line 32 def url( name, view = 'view', query = '' ) return unless name "#{root_url}/#{view}/#{url_name_for_page_name(name)}#{query}" end |