lib/rubikon/throbber.rb in rubikon-0.2.1 vs lib/rubikon/throbber.rb in rubikon-0.3.0

- old
+ new

@@ -1,21 +1,26 @@ -# This code is free software; you can redistribute it and/or modify it under the -# terms of the new BSD License. +# This code is free software; you can redistribute it and/or modify it under +# the terms of the new BSD License. # -# Copyright (c) 2009, Sebastian Staudt +# Copyright (c) 2009-2010, Sebastian Staudt module Rubikon # A class for displaying and managing throbbers + # + # @author Sebastian Staudt + # @see Application::InstanceMethods#throbber + # @since 0.2.0 class Throbber < Thread SPINNER = '-\|/' # Creates and runs a Throbber that outputs to the given IO stream while the # given thread is alive # - # # +ostream+:: The IO stream the throbber should be written to - # +thread+:: The thread that should be watched + # @param [IO] ostream the IO stream the throbber should be written to + # @param [Thread] thread The thread that should be watched + # @see Application::InstanceMethods#throbber def initialize(ostream, thread) proc = Proc.new do |ostream, thread| step = 0 ostream.putc 32 while thread.alive?