Class: Dry::Types::Printer Private

Inherits:
Object
  • Object
show all
Defined in:
lib/dry/struct/printer.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

#visit_struct_sum(sum) ⇒ 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.



12
13
14
15
16
17
18
# File 'lib/dry/struct/printer.rb', line 12

def visit_struct_sum(sum)
  visit_sum_constructors(sum) do |constructors|
    visit_options(EMPTY_HASH, sum.meta) do |opts|
      yield "Struct::Sum<#{constructors}#{opts}>"
    end
  end
end