Class: Dry::Schema::Messages::Template Private

Inherits:
Object
  • Object
show all
Extended by:
Initializer
Defined in:
lib/dry/schema/messages/template.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#call(data = EMPTY_HASH) ⇒ Object Also known as: []

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



27
28
29
30
# File 'lib/dry/schema/messages/template.rb', line 27

def call(data = EMPTY_HASH)
  ensure_message!
  messages.interpolate(key, options, **data)
end

#data(data = EMPTY_HASH) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



21
22
23
24
# File 'lib/dry/schema/messages/template.rb', line 21

def data(data = EMPTY_HASH)
  ensure_message!
  messages.interpolatable_data(key, options, **options, **data)
end