Module: Vogue::Helpers::InstanceMethods

Defined in:
lib/vogue/helpers.rb

Instance Method Summary collapse

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(options = {})
  if options.blank?
    self.class.vogue_data
  elsif options.is_a?(Symbol)
    self.class.vogue_data[options]
  elsif options.is_a?(Hash)
    self.class.vogue_data = options
  else
    raise ArgumentError, "options must be a symbol, a hash or blank."
  end
end