Class: KBMemo
Overview
KBMemo
Instance Attribute Summary collapse
-
#contents ⇒ Object
Returns the value of attribute contents.
-
#filepath ⇒ Object
Returns the value of attribute filepath.
Instance Method Summary collapse
-
#initialize(db, filepath, contents = '') ⇒ KBMemo
constructor
———————————————————————– initialize ———————————————————————–.
-
#read_from_file ⇒ Object
———————————————————————– read_from_file ———————————————————————–.
-
#write_to_file ⇒ Object
———————————————————————– write_to_file ———————————————————————–.
Constructor Details
#initialize(db, filepath, contents = '') ⇒ KBMemo
initialize
3358 3359 3360 3361 3362 |
# File 'lib/kirbybase.rb', line 3358 def initialize(db, filepath, contents='') @db = db @filepath = filepath @contents = contents end |
Instance Attribute Details
#contents ⇒ Object
Returns the value of attribute contents.
3353 3354 3355 |
# File 'lib/kirbybase.rb', line 3353 def contents @contents end |
#filepath ⇒ Object
Returns the value of attribute filepath.
3353 3354 3355 |
# File 'lib/kirbybase.rb', line 3353 def filepath @filepath end |
Instance Method Details
#read_from_file ⇒ Object
read_from_file
3367 3368 3369 |
# File 'lib/kirbybase.rb', line 3367 def read_from_file @contents = @db.engine.read_memo_file(@filepath) end |
#write_to_file ⇒ Object
write_to_file
3374 3375 3376 |
# File 'lib/kirbybase.rb', line 3374 def write_to_file @db.engine.write_memo_file(@filepath, @contents) end |