Class: Muon::History
- Inherits:
-
Object
- Object
- Muon::History
- Defined in:
- lib/muon/history.rb
Instance Method Summary collapse
- #append(entry) ⇒ Object
- #entries ⇒ Object
-
#initialize(working_dir) ⇒ History
constructor
A new instance of History.
Constructor Details
#initialize(working_dir) ⇒ History
Returns a new instance of History.
5 6 7 |
# File 'lib/muon/history.rb', line 5 def initialize(working_dir) @working_dir = working_dir end |
Instance Method Details
#append(entry) ⇒ Object
21 22 23 |
# File 'lib/muon/history.rb', line 21 def append(entry) self.head = save_entry(entry.with_parent_hash(head)) end |
#entries ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/muon/history.rb', line 9 def entries if block_given? entry = load_entry(head) while entry yield entry entry = load_entry(entry.parent_hash) end else enum_for :entries end end |