Class: PryKeybind::InputState
- Inherits:
-
Object
- Object
- PryKeybind::InputState
- Defined in:
- lib/pry-keybind.rb
Instance Attribute Summary collapse
-
#pry_instance ⇒ Object
readonly
Returns the value of attribute pry_instance.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(pry_instance) ⇒ InputState
constructor
A new instance of InputState.
- #restore!(pry_eval: true, readline_buffer: true) ⇒ Object
- #save!(pry_eval: true, readline_buffer: true) ⇒ Object
Constructor Details
#initialize(pry_instance) ⇒ InputState
Returns a new instance of InputState.
163 164 165 |
# File 'lib/pry-keybind.rb', line 163 def initialize(pry_instance) @pry_instance = pry_instance end |
Instance Attribute Details
#pry_instance ⇒ Object (readonly)
Returns the value of attribute pry_instance.
157 158 159 |
# File 'lib/pry-keybind.rb', line 157 def pry_instance @pry_instance end |
Class Method Details
.save!(pry_instance) ⇒ Object
159 160 161 |
# File 'lib/pry-keybind.rb', line 159 def self.save!(pry_instance) new(pry_instance).save! end |
Instance Method Details
#restore!(pry_eval: true, readline_buffer: true) ⇒ Object
174 175 176 177 178 179 |
# File 'lib/pry-keybind.rb', line 174 def restore!(pry_eval: true, readline_buffer: true) restore_pry_eval_string if pry_eval restore_readline_line_buffer if readline_buffer self end |
#save!(pry_eval: true, readline_buffer: true) ⇒ Object
167 168 169 170 171 172 |
# File 'lib/pry-keybind.rb', line 167 def save!(pry_eval: true, readline_buffer: true) save_pry_eval_string if pry_eval save_readline_line_buffer if readline_buffer self end |