Class: Hanami::DB::Struct

Inherits:
ROM::Struct
  • Object
show all
Defined in:
lib/hanami/db/struct.rb

Overview

Since:

  • 2.2.0

Instance Method Summary collapse

Instance Method Details

#to_json(*args) ⇒ Object

Simple conversion of attributes to JSON format, without this method, the instance of the struct gets converted to a string

Since:

  • 2.2.0



13
14
15
# File 'lib/hanami/db/struct.rb', line 13

def to_json(*args)
  to_h.to_json(*args)
end