Method: IGV.open
- Defined in:
- lib/igv.rb
.open(host: '127.0.0.1', port: 60_151, snapshot_dir: Dir.pwd) {|IGV| ... } ⇒ IGV
Create IGV object and connect to IGV server. This method accepts a block.
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/igv.rb', line 40 def self.open(host: '127.0.0.1', port: 60_151, snapshot_dir: Dir.pwd) igv = new(host: host, port: port, snapshot_dir: snapshot_dir) igv.connect return igv unless block_given? begin yield igv ensure @socket&.close end igv end |