struct Spectator::Formatting::Components::Comment(T)

Overview

Object that can be stringified pre-pended with a comment mark (#).

Defined in:

spectator/formatting/components/comment.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Object

should(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should(matcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should
, should_eventually(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_eventually, should_never(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_never, should_not(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should_not(matcher : Spectator::Matchers::NilMatcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not(matcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not

Constructor Detail

def self.new(content : T) #

Creates a comment with the specified content.


[View source]

Class Method Detail

def self.colorize(content) #

Creates a colored comment.


[View source]

Instance Method Detail

def to_s(io : IO) : Nil #

Writes the comment to the output.


[View source]