class Chem::DX::Writer
- Chem::DX::Writer
- Reference
- Object
Included Modules
Defined in:
chem/formats/dx.crConstructors
-
.new(io : IO, sync_close : Bool = false)
Creates a new object from the given io.
-
.new(path : Path | String) : self
Creates a new object from the given path.
Class Method Summary
-
.open(io : IO, sync_close : Bool = false, & : self -> )
Creates a new object from the given io, yields it to the given block, and closes it at the end.
-
.open(path : Path | String, & : self -> )
Creates a new object from the given path yields it to the given block, and closes it at the end.
Instance methods inherited from module Chem::FormatWriter(Chem::Spatial::Grid)
<<(obj : T) : Nil
<<,
format(str : String, *args, **options) : Nil
format,
formatl(str : String, *args, **options) : Nil
formatl,
written? : Bool
written?
Instance methods inherited from module IO::Wrapper
close
close,
closed? : Bool
closed?,
sync_close : Bool
sync_close,
sync_close=(sync_close : Bool)
sync_close=
Constructor Detail
Creates a new object from the given path. Positional and named arguments are forwarded to the designated constructor.
An IO
object will be created and open from the given path,
which will be closed when closing this object (sync_close = true
). The file open mode is specified by the FILE_MODE
constant.
Class Method Detail
Creates a new object from the given io, yields it to the given block, and closes it at the end. Positional and named arguments are forwarded to the constructor.
Creates a new object from the given path yields it to the given block, and closes it at the end. Positional and named arguments are forwarded to the constructor.
An IO
object will be created and open from the given path,
which will be closed when closing this object (sync_close = true
). The file open mode is specified by the FILE_MODE
constant.