Module: Typ::Formatter::FormatGate

Included in:
Typ::Formatter
Defined in:
lib/typ/formatter.rb

Defined Under Namespace

Modules: ToPascalCase Classes: Formatter, Is, IsA, Its, Key

Instance Method Summary collapse

Instance Method Details

#format_gate(gate) ⇒ Object



59
60
61
62
63
64
65
66
67
# File 'lib/typ/formatter.rb', line 59

def format_gate gate
  if gate.is_a? Typ
    Typ::Formatter.new gate
  else
    FormatGate
      .const_get(gate.dsl_method.to_pascal_case)
      .new(gate)
  end
end