Sha256: 4e956a091285050ac32eb8f7b82438e7aa475ee167a0cfae58cf4ba2ae6614c1

Contents?: true

Size: 281 Bytes

Versions: 9

Compression:

Stored size: 281 Bytes

Contents

# frozen_string_literal: true
require 'rom'
require 'rom/struct'

module ROM
  # Simple data-struct
  #
  # By default mappers use this as the model
  #
  # @api public
  class Struct
    alias as_json to_hash

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
roda-endpoints-0.3.6 lib/rom/struct/to_json.rb
roda-endpoints-0.3.5 lib/rom/struct/to_json.rb
roda-endpoints-0.3.4 lib/rom/struct/to_json.rb
roda-endpoints-0.3.3 lib/rom/struct/to_json.rb
roda-endpoints-0.3.2 lib/rom/struct/to_json.rb
roda-endpoints-0.3.1 lib/rom/struct/to_json.rb
roda-endpoints-0.3.0 lib/rom/struct/to_json.rb
roda-endpoints-0.2.0 lib/rom/struct/to_json.rb
roda-endpoints-0.1.0 lib/rom/struct/to_json.rb