Module: Vogue::Helpers::InstanceMethods
- Defined in:
- lib/vogue/helpers.rb
Instance Method Summary collapse
-
#vogue(options = {}) ⇒ Object
Vogue helper method.
Instance Method Details
#vogue(options = {}) ⇒ Object
Vogue helper method. Call within your controllers or views to fetch vogue data.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/vogue/helpers.rb', line 15 def vogue( = {}) if .blank? self.class.vogue_data elsif .is_a?(Symbol) self.class.vogue_data[] elsif .is_a?(Hash) self.class.vogue_data = else raise ArgumentError, "options must be a symbol, a hash or blank." end end |