bin/yri in yard-0.4.0 vs bin/yri in yard-0.5.0
- old
+ new
@@ -1,29 +1,4 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../lib/yard'
-YARD::Registry.load
-
-if ARGV[0] == '-T' || ARGV[0] == '--no-pager'
- output = YARD::Serializers::StdoutSerializer.new
- ARGV.shift
-else
- output = YARD::Serializers::ProcessSerializer.new('less')
-end
-
-if ARGV[0].nil? || ARGV[0].empty?
- puts "Missing object argument"
- exit(1)
-end
-
-obj = YARD::Registry.at(ARGV[0])
-if obj.nil?
- puts "No documentation for #{ARGV[0]}"
- exit(1)
-end
-
-if obj.type == :method && obj.is_alias?
- tmp = P(obj.namespace, (obj.scope == :instance ? "#" : "") +
- obj.namespace.aliases[obj].to_s)
- obj = tmp unless YARD::CodeObjects::Proxy === tmp
-end
-obj.format(:serializer => output)
+YARD::CLI::YRI.run(*ARGV)
\ No newline at end of file