class Cride::FileHandler
- Cride::FileHandler
- Reference
- Object
Defined in:
file_handler.crConstructors
-
.new(data : String = "", name : String | Nil = nil, saved : Bool = false)
Reads from a
String
. -
.new(io : IO, name : String | Nil = nil, saved : Bool = false)
Read from an
IO
. - .new(name : String | Nil, rows : Array(String), saved : Bool = false)
Class Method Summary
-
.read(file_name : String | Nil, saved : Bool = true)
Reads from a file.
Instance Method Summary
- #add : Add
- #delete : Delete
-
#name : String | Nil
Name or file path in disk.
-
#name=(name : String | Nil)
Name or file path in disk.
- #rows : Array(String)
- #rows=(rows : Array(String))
-
#saved? : Bool
The data is saved on disk.
-
#to_s : String
Returns a nicely readable and concise string representation of this object, typically intended for users.
-
#write
Write the editor's data to a file
Constructor Detail
Reads from a String
.
Read from an IO
.
Class Method Detail
Instance Method Detail
def to_s : String
#
Description copied from class Object
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO)
which can be overridden for custom implementations.
Also see #inspect
.