Class: Session::PopulateHistory
- Includes:
- Setup::Store
- Defined in:
- lib/pry-byetypo/session/populate_history.rb
Constant Summary
Constants included from Setup::Store
Setup::Store::DEFAULT_STORE_PATH, Setup::Store::SEVEN_DAYS
Instance Attribute Summary collapse
-
#binding ⇒ Object
readonly
Returns the value of attribute binding.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(binding) ⇒ PopulateHistory
constructor
A new instance of PopulateHistory.
Methods included from Setup::Store
#staled_store?, #store, #store_path
Methods inherited from Base
Constructor Details
#initialize(binding) ⇒ PopulateHistory
Returns a new instance of PopulateHistory.
12 13 14 |
# File 'lib/pry-byetypo/session/populate_history.rb', line 12 def initialize(binding) @binding = binding end |
Instance Attribute Details
#binding ⇒ Object (readonly)
Returns the value of attribute binding.
10 11 12 |
# File 'lib/pry-byetypo/session/populate_history.rb', line 10 def binding @binding end |
Instance Method Details
#call ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/pry-byetypo/session/populate_history.rb', line 16 def call return unless is_assignement_variables? store.transaction do store.abort unless variables_to_store store[pry_instance_uid].push(*variables_to_store) end end |