class Cride::FileHandler

Defined in:

file_handler.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

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

Reads from a String.


[View source]
def self.new(io : IO, name : String | Nil = nil, saved : Bool = false) #

Read from an IO.


[View source]
def self.new(name : String | Nil, rows : Array(String), saved : Bool = false) #

[View source]

Class Method Detail

def self.read(file_name : String | Nil, saved : Bool = true) #

Reads from a file.


[View source]

Instance Method Detail

def add : Add #

[View source]
def delete : Delete #

[View source]
def name : String | Nil #

Name or file path on disk.


[View source]
def name=(name : String | Nil) #

Name or file path on disk.


[View source]
def rows : Array(String) #

[View source]
def rows=(rows : Array(String)) #

[View source]
def saved? : Bool #

The data is saved on disk.


[View source]
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>

[View source]
def write #

Write the editor's data to a file.


[View source]