Sha256: 461ca35cda9265c664cb6648801cd9ee8028d20ecccae6d1e3959b98bed03626
Contents?: true
Size: 301 Bytes
Versions: 6
Compression:
Stored size: 301 Bytes
Contents
module Ohm class Model # Export a JSON representation of the model by encoding `to_hash`. def to_json(*args) to_hash.to_json(*args) end end module Collection # Sugar for to_a.to_json for all types of Sets def to_json(*args) to_a.to_json(*args) end end end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
ohm-3.1.1 | lib/ohm/json.rb |
ohm-3.1.0 | lib/ohm/json.rb |
ohm-3.0.3 | lib/ohm/json.rb |
ohm-3.0.2 | lib/ohm/json.rb |
ohm-3.0.1 | lib/ohm/json.rb |
ohm-3.0.0 | lib/ohm/json.rb |