class Synco::Command::Top

Public Instance Methods

call() click to toggle source
# File lib/synco/command.rb, line 59
def call
        if @options[:version]
                puts "synco v#{Synco::VERSION}"
        elsif @options[:help] or @command.nil?
                print_usage(program_name)
        else
                chdir do
                        @command.call
                end
        end
end
chdir() { || ... } click to toggle source
# File lib/synco/command.rb, line 43
def chdir(&block)
        if root = @options[:root]
                Dir.chdir(root, &block)
        else
                yield
        end
end