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
- #write_to_file ⇒ Object
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
#contents ⇒ Object
Returns the value of attribute contents.
2450 2451 2452 |
# File 'lib/og/vendor/kirbybase.rb', line 2450 def contents @contents end |
#filepath ⇒ Object
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_file ⇒ Object
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_file ⇒ Object
2465 2466 2467 |
# File 'lib/og/vendor/kirbybase.rb', line 2465 def write_to_file @db.engine.write_memo_file(@filepath, @contents) end |