diff --git a/lib/launchpad/index.rb b/lib/launchpad/index.rb index d682017..ce4fba4 100644 --- a/lib/launchpad/index.rb +++ b/lib/launchpad/index.rb @@ -6,6 +6,7 @@ module Launchpad # Provides a diff between local and remote file data by maintaining a cache # with pathnames and md5 hex digests. class Index + # @param [Launchpad::Patcher] patcher def initialize(patcher) @patcher = patcher @target_dir = Pathname.new Settings.read :install diff --git a/lib/launchpad/patcher.rb b/lib/launchpad/patcher.rb index c46f316..cb4ec66 100644 --- a/lib/launchpad/patcher.rb +++ b/lib/launchpad/patcher.rb @@ -14,14 +14,14 @@ def in_sync? index.diff.empty? end - # Determines the code to be executed when progress changes for the current - # operation. + # @param [Proc] block sets the callback to be run when progress is updated. + # @return [self] def on_update(&block) @update_callback = block + self end - # @return [Float] - # denotes the completion percentage for the current operation. + # @return [Float] the completion percentage for the current operation. def progress @progress || 0.0 end