Class: RBS::Dynamic::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/rbs/dynamic/cli.rb

Instance Method Summary collapse

Instance Method Details

#trace(filename) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/rbs/dynamic/cli.rb', line 26

def trace(filename)
  decls = RBS::Dynamic.trace(**options) {
    load filename
  }.values
  stdout = StringIO.new
  writer = RBS::Writer.new(out: stdout)
  writer.write(decls)
  puts "# RBS dynamic trace #{RBS::Dynamic::VERSION}"
  puts
  puts stdout.string
end

#versionObject



8
9
10
# File 'lib/rbs/dynamic/cli.rb', line 8

def version
  puts "rbs dynamic version #{RBS::Dynamic::VERSION}"
end