Class | Sequel::Plugins::JsonSerializer::Literal
In: | lib/sequel/plugins/json_serializer.rb
Parent: | Object

Helper class used for making sure that cascading options for model associations works correctly. Cascaded options work by creating instances of this class, which take a literal JSON string and have `to_json` return it.

### Methods

new to_json

### Public Class methods

new(json)

Store the literal JSON to use

[Source]

        # File lib/sequel/plugins/json_serializer.rb, line 86
    86:         def initialize(json)
    87:           @json = json
    88:         end

### Public Instance methods

to_json(*a)

Return the literal JSON to use

[Source]

        # File lib/sequel/plugins/json_serializer.rb, line 91
    91:         def to_json(*a)
    92:           @json
    93:         end

[Validate]