Exception: FTL::Errors::LocalsError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ftl/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(serializer) ⇒ LocalsError

Returns a new instance of LocalsError.



6
7
8
9
10
11
# File 'lib/ftl/errors.rb', line 6

def initialize(serializer)
  super("#{serializer} is expecting your locals as a hash."\
    " You can do this by passing in a locals hash to your serializer like this:"\
    " #{serializer}.new(your_object, locals: { your_locals_object: obj })"\
    " or like this: #{serializer}.new(your_object).locals(your_locals_object: obj).")
end