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 on disk.
-
#name=(name : String | Nil)
Name or file path on disk.
- #rows : Array(String)
- #rows=(rows : Array(String))
-
#saved? : Bool
The data is saved on disk.
-
#to_s(io : IO) : Nil
Appends a short String representation of this object which includes its class name and its object address.
-
#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(io : IO) : Nil
#
Description copied from class Reference
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>