Class: KBMemo

Inherits:
Object show all
Defined in:
lib/og/vendor/kirbybase.rb

Overview


KBMemo


Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(db, filepath, contents = '') ⇒ KBMemo


initialize




2455
2456
2457
2458
2459
# File 'lib/og/vendor/kirbybase.rb', line 2455

def initialize(db, filepath, contents='')
    @db = db
    @filepath = filepath
    @contents = contents
end

Instance Attribute Details

#contentsObject

Returns the value of attribute contents.



2450
2451
2452
# File 'lib/og/vendor/kirbybase.rb', line 2450

def contents
  @contents
end

#filepathObject

Returns the value of attribute filepath.



2450
2451
2452
# File 'lib/og/vendor/kirbybase.rb', line 2450

def filepath
  @filepath
end

Instance Method Details

#read_from_fileObject



2461
2462
2463
# File 'lib/og/vendor/kirbybase.rb', line 2461

def read_from_file
    @contents = @db.engine.read_memo_file(@filepath)
end

#write_to_fileObject



2465
2466
2467
# File 'lib/og/vendor/kirbybase.rb', line 2465

def write_to_file
    @db.engine.write_memo_file(@filepath, @contents)
end