Class: Gherkin::Formatter::PrettyFormatter::ColorFormat

Inherits:
Object
  • Object
show all
Includes:
AnsiEscapes
Defined in:
lib/gherkin/formatter/pretty_formatter.rb

Constant Summary

Constants included from AnsiEscapes

AnsiEscapes::ALIASES, AnsiEscapes::COLORS

Instance Method Summary collapse

Methods included from AnsiEscapes

#reset, #up

Constructor Details

#initialize(status) ⇒ ColorFormat

Returns a new instance of ColorFormat.



127
128
129
# File 'lib/gherkin/formatter/pretty_formatter.rb', line 127

def initialize(status)
  @status = status
end

Instance Method Details

#text(text) ⇒ Object



131
132
133
# File 'lib/gherkin/formatter/pretty_formatter.rb', line 131

def text(text)
  self.__send__(@status) + text + reset
end