lib/yard/lib/yard/cli/yri.rb
# Runs the command-line utility.
#
# @example
#   YRI.new.run('String#reverse')
# @param [Array<String>] args each tokenized argument
Runs the command-line utility.
Runs the command - line utility .
def run(*args)
        optparse(*args)
        if ::RbConfig::CONFIG['host_os'] =~ /mingw|win32/
          @serializer ||= YARD::Serializers::StdoutSerializer.new
        else
          @serializer ||= YARD::Serializers::ProcessSerializer.new('less')
        end
        if @name.nil? || @name.strip.empty?
          print_usage
          exit(1)
        elsif object = find_object(@name)
          print_object(object)
        else
          STDERR.puts "No documentation for `#{@name}'"
          exit(1)
        end
      end
def run ( * args ) optparse ( * args ) if :: RbConfig :: CONFIG [ 'host_os' ] =~ / mingw|win32 / @serializer ||= YARD :: Serializers :: StdoutSerializer . new else @serializer ||= YARD :: Serializers :: ProcessSerializer . new ( 'less' ) end if @name . nil? || @name . strip . empty? print_usage exit ( 1 ) elsif object = find_object ( @name ) print_object ( object ) else STDERR . puts "No documentation for `#{@name}'" exit ( 1 ) end end
Runs the command-line utility.
Runs the command - line utility .
args
args each tokenized argument
args each tokenized argument
example
None