class

Cride::FileHandler

Inherits Reference / Object

Constructors

new(data : String = "", name : String | Nil = nil, saved : Bool = false)

Reads from a String.

Source
new(io : IO, name : String | Nil = nil, saved : Bool = false)

Read from an IO.

Source
new(name : String | Nil, rows : Array(String), saved : Bool = false)
Source

Class methods

read(file_name : String | Nil, saved : Bool = true)

Reads from a file.

Source

Instance methods

delete
Source
name

Name or file path on disk.

Source
name=(name : String | Nil)

Name or file path on disk.

Source
rows
Source
rows=(rows : Array(String))
Source
saved?

The data is saved on disk.

Source
to_s(io : IO) : Nil

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>
Source
write

Write the editor's data to a file.

Source

Nested types