fix: separation between run and print function
This commit is contained in:
parent
6b3987a39a
commit
4c2e9e9a86
1 changed files with 8 additions and 6 deletions
|
@ -119,9 +119,15 @@ class RougailOutputConsole:
|
||||||
self.end()
|
self.end()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def run(self) -> None:
|
def run(self) -> str:
|
||||||
|
with self.console.capture() as capture:
|
||||||
|
self.print()
|
||||||
|
return capture.get()
|
||||||
|
|
||||||
|
def print(self) -> None:
|
||||||
self.exporter()
|
self.exporter()
|
||||||
return self.print()
|
for out in self.out:
|
||||||
|
self.console.print(out)
|
||||||
|
|
||||||
def parse_options(
|
def parse_options(
|
||||||
self,
|
self,
|
||||||
|
@ -216,10 +222,6 @@ class RougailOutputConsole:
|
||||||
def end(self):
|
def end(self):
|
||||||
self.out.append(self.output.tree)
|
self.out.append(self.output.tree)
|
||||||
|
|
||||||
def print(self):
|
|
||||||
for out in self.out:
|
|
||||||
self.console.print(out)
|
|
||||||
|
|
||||||
|
|
||||||
class OutputFamily:
|
class OutputFamily:
|
||||||
def __init__(
|
def __init__(
|
||||||
|
|
Loading…
Reference in a new issue