class Nazar::HeadersFormatter

Attributes

headers[R]

Public Class Methods

new(headers) click to toggle source
# File lib/nazar/headers_formatter.rb, line 5
def initialize(headers)
  @headers = headers
end

Public Instance Methods

format() click to toggle source
# File lib/nazar/headers_formatter.rb, line 9
def format
  headers.map { |header| pastel.bold(header) }
end

Private Instance Methods

pastel() click to toggle source
# File lib/nazar/headers_formatter.rb, line 17
def pastel
  @pastel ||= Pastel.new(enabled: Nazar.config.colors.enabled)
end