Class: Typ::Formatter::FormatGate::IsA
- Defined in:
- lib/typ/formatter.rb
Instance Attribute Summary
Attributes inherited from Formatter
Instance Method Summary collapse
Methods inherited from Formatter
#actual, #head, #initialize, #to_s
Constructor Details
This class inherits a constructor from Typ::Formatter::FormatGate::Formatter
Instance Method Details
#format ⇒ Object
82 83 84 85 86 87 88 89 90 |
# File 'lib/typ/formatter.rb', line 82 def format string = "is_a #{gate.dsl_literal}" if gate.ok? Rainbow(string).green else Rainbow(string).red + "\n" + "got #{gate.it.class}".indent(2) + "\n" + gate.it.ai.indent(4) end end |