Sha256: 7531f8e1a860eb5e47ff1146c7b35d156eaa02594e5bd51804a2c1d9abf16c27
Contents?: true
Size: 1.1 KB
Versions: 5
Compression:
Stored size: 1.1 KB
Contents
class Console { "Console class. Used for @STDIO." def Console newline { "Prints a newline to @STDOUT." STDOUT puts() } def Console print: obj { """ @obj Object to be printed on @STDOUT. Prints a given object on @STDOUT. """ STDOUT print(obj) } def Console println: obj { """ @obj Object to be printed on @STDOUT, followed by a newline. Prints a given object on @STDOUT, followed by a newline. """ STDOUT puts(obj) } def Console readln: message { """ @message A @String@ that should be printed to @STDOUT before reading from @STDIN. @return Line (@String@) read from @STDIN. Prints a given message to @STDOUT, followed by reading a line from @STDIN. """ Console print: message if: (STDIN eof?) then: { nil } else: { STDIN gets() chomp } } def Console readln { """ @return Line (@String@) read from @STDIN. Reads a line from @STDIN and returns it as a @String@. """ STDIN gets() chomp } def Console clear { "Clears the @Console@." Console print: CLEAR_STR } }
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
fancy-0.5.0 | lib/rbx/console.fy |
fancy-0.4.0 | lib/rbx/console.fy |
fancy-0.3.3 | lib/rbx/console.fy |
fancy-0.3.2 | lib/rbx/console.fy |
fancy-0.3.1 | lib/rbx/console.fy |