{"id":24264607,"url":"https://github.com/donkeybridge/outputhandler","last_synced_at":"2026-06-01T03:31:56.418Z","repository":{"id":56887121,"uuid":"179983922","full_name":"donkeybridge/outputhandler","owner":"donkeybridge","description":"A simple Ruby class to pause output. ","archived":false,"fork":false,"pushed_at":"2022-01-02T00:38:36.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-16T20:34:47.704Z","etag":null,"topics":["print","puts","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/donkeybridge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-07T15:17:09.000Z","updated_at":"2022-01-02T00:38:39.000Z","dependencies_parsed_at":"2022-08-20T15:20:50.633Z","dependency_job_id":null,"html_url":"https://github.com/donkeybridge/outputhandler","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/donkeybridge/outputhandler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeybridge%2Foutputhandler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeybridge%2Foutputhandler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeybridge%2Foutputhandler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeybridge%2Foutputhandler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donkeybridge","download_url":"https://codeload.github.com/donkeybridge/outputhandler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeybridge%2Foutputhandler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33759178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["print","puts","ruby"],"created_at":"2025-01-15T09:32:31.857Z","updated_at":"2026-06-01T03:31:56.391Z","avatar_url":"https://github.com/donkeybridge.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OutputHandler\n\nA wrapper class for ruby, that allows output to be paused. Output can be send to console, to a logfile or both.\n\n## Description\n\nAn OutputHandler instance provides #print and #puts, behaving like commonly used IO::print and IO::puts, \nexcept that these do not accept _\\*args_ but only one chunk to be output. \nAnd it behaves this way as long as #pause is not triggered. With output being paused, chunks sent to the \ninstance will wait until either #unpause or #flush are triggered.\n\nAt any time, using #print! or #puts! will output directly. \n\nWhen using #pause(_limit_), the output is paused for _limit_ seconds (e.g. when printing a help message in a\nfluent stream). \n\n\\#print(!) and \\#puts(!) allow a second argument of type Boolean, that adds a carriage return to the beginning of the chunk (e.g. for displaying a progressbar). Please note, that alike IO::print, you probably want to add whitespace to overwrite the entire previous output. \n\nOutputHandler.new is the same as OutputHandler.new(console: true, logfile: nil).\n\nTo discard currently queued output, use #flush(_true_).\n\n\n## Installation\n\n    gem install outputhandler\n\n## Usage example:\n\n    user:~/$ irb\n    \"Loading irbrc\"\n    2.5.1 :001 \u003e require 'outputhandler'\n    2.5.1 :002 \u003e o = OutputHandler.new\n    2.5.1 :003 \u003e o.print \"01: Lore ipsum dolor sit amet\"\n    01: Lore ipsum dolor sit amet2.5.1 :004 \u003e o.pause\n    2.5.1 :005 \u003e o.puts  \"02: consectetuer adipiscing elit\"\n    2.5.1 :006 \u003e o.puts! \"03: Aliquam hendrerit mi posuere lectus\"\n    03: Aliquam hendrerit mi posuere lectus\n    2.5.1 :007 \u003e o.flush\n    02: consectetuer adipiscing elit\n    2.5.1 :008 \u003e o.puts  \"04: Vestibulum enim wisi\"\n    2.5.1 :009 \u003e o.puts! \"05: viverra nec, fringilla in\"\n    05: viverra nec, fringilla in\n    2.5.1 :010 \u003e o.unpause\n    04: Vestibulum enim wisi\n    2.5.1 :011 \u003e o.puts  \"06: laoreet vitae, risus.\"\n    06: laoreet vitae, risus.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonkeybridge%2Foutputhandler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonkeybridge%2Foutputhandler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonkeybridge%2Foutputhandler/lists"}