Method: Capp.open
- Defined in:
- lib/capp.rb
.open(device_or_file, *args) ⇒ Object
Opens device_or_file as an offline device if it is an IO or an existing file. args are ignored (as ::offline does not support any).
Opens device_or_file as a live device otherwise, along with args. See ::live for documentation on the additional arguments.
147 148 149 150 151 152 153 |
# File 'lib/capp.rb', line 147 def self.open device_or_file, *args if IO === device_or_file or File.exist? device_or_file then offline device_or_file, *args else live device_or_file, *args end end |