generated from athena-framework/component-template
/
null.cr
49 lines (37 loc) · 1.29 KB
/
null.cr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
require "./interface"
# An `ACON::Output::Interface` that does not output anything, such as for tests.
class Athena::Console::Output::Null
include Athena::Console::Output::Interface
@formatter : ACON::Formatter::Interface? = nil
# :inherit:
def puts(message : String | Enumerable(String), verbosity : ACON::Output::Verbosity = :normal, output_type : ACON::Output::Type = :normal) : Nil
end
# :inherit:
def print(message : String | Enumerable(String), verbosity : ACON::Output::Verbosity = :normal, output_type : ACON::Output::Type = :normal) : Nil
end
def puts(message, verbosity : ACON::Output::Verbosity = :normal, output_type : ACON::Output::Type = :normal) : Nil
end
def print(message, verbosity : ACON::Output::Verbosity = :normal, output_type : ACON::Output::Type = :normal) : Nil
end
# :inherit:
def verbosity : ACON::Output::Verbosity
ACON::Output::Verbosity::QUIET
end
# :inherit:
def verbosity=(verbosity : ACON::Output::Verbosity) : Nil
end
# :inherit:
def decorated=(decorated : Bool) : Nil
end
# :inherit:
def decorated? : Bool
false
end
# :inherit:
def formatter : ACON::Formatter::Interface
@formatter ||= ACON::Formatter::Null.new
end
# :inherit:
def formatter=(formatter : ACON::Formatter::Interface) : Nil
end
end