Module: ViewFu::MetaHelper
- Defined in:
- lib/view_fu/meta_helper.rb
Instance Method Summary collapse
-
#meta_description(meta_description = nil) ⇒ Object
Get/Set Meta Description.
-
#meta_keywords(meta_keywords = nil) ⇒ Object
Get/Set Meta Keywords.
-
#meta_tags ⇒ Object
Output the current page’s meta tags.
Instance Method Details
#meta_description(meta_description = nil) ⇒ Object
Get/Set Meta Description
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/view_fu/meta_helper.rb', line 32 def ( = nil) if @__meta_description = else @__meta_description ||= "" # Check if we have AppConfig to use for default if defined? AppConfig = AppConfig. else = "" end # set the default if meta_description is blank @__meta_description = if @__meta_description.blank? end return @__meta_description end |
#meta_keywords(meta_keywords = nil) ⇒ Object
Get/Set Meta Keywords
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/view_fu/meta_helper.rb', line 12 def ( = nil) if @__meta_keywords = else @__meta_keywords ||= "" # Check if we have AppConfig to use for default if defined? AppConfig = AppConfig. else = "" end # set the default if meta_keywords is blank @__meta_keywords = if @__meta_keywords.blank? end return @__meta_keywords end |
#meta_tags ⇒ Object
Output the current page’s meta tags
4 5 6 7 8 9 |
# File 'lib/view_fu/meta_helper.rb', line 4 def %( <meta name="keywords" content="#{}" /> <meta name="description" content="#{}" /> ) end |