Method: Partitional::Model#as_json

Defined in:
lib/partitional/model.rb

#as_jsonObject



56
57
58
59
60
61
62
# File 'lib/partitional/model.rb', line 56

def as_json
  attrs = self.class.attributes.map do |key|
    [key, send(key)]
  end

  Hash[attrs]
end