Class: Session::ClearHistory
- Includes:
- Setup::Store
- Defined in:
- lib/pry-byetypo/session/clear_history.rb
Constant Summary
Constants included from Setup::Store
Setup::Store::DEFAULT_STORE_PATH, Setup::Store::SEVEN_DAYS
Instance Attribute Summary collapse
-
#pry ⇒ Object
readonly
Returns the value of attribute pry.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(pry) ⇒ ClearHistory
constructor
A new instance of ClearHistory.
Methods included from Setup::Store
#staled_store?, #store, #store_path
Methods inherited from Base
Constructor Details
#initialize(pry) ⇒ ClearHistory
Returns a new instance of ClearHistory.
12 13 14 |
# File 'lib/pry-byetypo/session/clear_history.rb', line 12 def initialize(pry) @pry = pry end |
Instance Attribute Details
#pry ⇒ Object (readonly)
Returns the value of attribute pry.
10 11 12 |
# File 'lib/pry-byetypo/session/clear_history.rb', line 10 def pry @pry end |
Instance Method Details
#call ⇒ Object
16 17 18 19 |
# File 'lib/pry-byetypo/session/clear_history.rb', line 16 def call pry_instance_to_remove = pry.push_initial_binding.join store.transaction { store.delete(pry_instance_to_remove) } end |