File: script.rb

package info (click to toggle)
ruby-bio 1.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,480 kB
  • ctags: 9,428
  • sloc: ruby: 74,117; xml: 3,383; makefile: 17; perl: 13; sh: 1
file content (25 lines) | stat: -rw-r--r-- 476 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#
# = bio/shell/script.rb - script mode for the BioRuby shell
#
# Copyright::   Copyright (C) 2006
#               Toshiaki Katayama <k@bioruby.org>
# License::     The Ruby License
#
# $Id: script.rb,v 1.3 2007/04/05 23:35:41 trevor Exp $
#

module Bio::Shell

  class Script

    def initialize(script)
      Bio::Shell.cache[:binding] = TOPLEVEL_BINDING
      Bio::Shell.load_session
      eval(File.read(script), TOPLEVEL_BINDING)
      exit
    end

  end # Script

end