Sha256: 560328a40d9db551b2c1396fd4f0db99f49e5f6a3b474a190e110fad06d03031

Contents?: true

Size: 755 Bytes

Versions: 45

Compression:

Stored size: 755 Bytes

Contents

#!/usr/bin/env ruby

args=ARGV
args=["-h"] if args.empty?

input,mode,master=false,:process,true

require 'optparse'

$VERBOSE = nil

OptionParser.new do |opts|
  opts.banner = "Usage: dyn-scan [options]"

  opts.on( '-p', '--pretty', 'pretty method' ) do
    mode=:pretty
  end

  opts.on( '-i', '--input', 'input line' ) do
    input=true
  end

  opts.on( '-x', '--extract', 'extract method' ) do
    mode=:extract
  end

end.parse!(args)


require 'dyndoc/base/scanner'
scan=Dyndoc::DevTagScanner.new(:dtag)
b=(input ? args[0] : File.read(args[0]) )
b="{#document][#main]"+b+"[#}" if master
scan.tokenize(b)
case mode
when :extract
  p scan.extract
when :pretty
  scan.pretty_print(scan.parse_text(scan.extract))
when :process
  p scan.process(b)
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
dyndoc-ruby-1.5.0 bin/dyn-scan
dyndoc-ruby-1.4.7 bin/dyn-scan
dyndoc-ruby-1.4.6 bin/dyn-scan
dyndoc-ruby-1.4.5 bin/dyn-scan
dyndoc-ruby-1.4.2 bin/dyn-scan
dyndoc-ruby-1.4.1 bin/dyn-scan
dyndoc-ruby-1.4.0 bin/dyn-scan
dyndoc-ruby-1.3.9 bin/dyn-scan
dyndoc-ruby-1.3.6 bin/dyn-scan
dyndoc-ruby-1.3.4 bin/dyn-scan
dyndoc-ruby-1.3.2 bin/dyn-scan
dyndoc-ruby-1.3.0 bin/dyn-scan
dyndoc-ruby-1.2.2 bin/dyn-scan
dyndoc-ruby-1.2.1 bin/dyn-scan
dyndoc-ruby-1.2.0 bin/dyn-scan
dyndoc-ruby-1.0.25 bin/dyn-scan
dyndoc-ruby-1.0.24 bin/dyn-scan
dyndoc-ruby-1.0.23 bin/dyn-scan
dyndoc-ruby-1.0.22 bin/dyn-scan
dyndoc-ruby-1.0.21 bin/dyn-scan