Module: AsJsonable::ClassMethods

Defined in:
lib/as_jsonable.rb

Instance Method Summary collapse

Instance Method Details

#as_json(options = {}) ⇒ Object



5
6
7
8
9
10
# File 'lib/as_jsonable.rb', line 5

def as_json(options={})
  define_method(:as_json) do |args|
    args ||= {}
    super(options.merge(args))
  end
end