Class: Cans::Historian

Inherits:
Object
  • Object
show all
Defined in:
lib/cans/historian.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHistorian

Returns a new instance of Historian.



5
6
7
8
9
10
# File 'lib/cans/historian.rb', line 5

def initialize
  self.history = Set.new
  self.enabled = false
  try_history
  try_bugging_rails
end

Instance Attribute Details

#enabledObject

Returns the value of attribute enabled.



3
4
5
# File 'lib/cans/historian.rb', line 3

def enabled
  @enabled
end

#historyObject

Returns the value of attribute history.



4
5
6
# File 'lib/cans/historian.rb', line 4

def history
  @history
end

Instance Method Details

#delveObject



12
13
14
15
16
# File 'lib/cans/historian.rb', line 12

def delve
  return unless enabled
  merge_history
  reload_history
end

#recordObject



18
19
20
# File 'lib/cans/historian.rb', line 18

def record
  merge_history
end