Module: ActsAsPresentable::InstanceMethods::ClassMethods

Defined in:
lib/acts_as_presentable.rb

Instance Method Summary collapse

Instance Method Details

#as_json(options = {}) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/acts_as_presentable.rb', line 32

def as_json(options={})
  if options && options.has_key?(presenter_key)
    options[presenter_key].new(self).as_json(options)
  else
    presenter_class.new(self).as_json(options)
  end
end