Class: Cardigan::Command::ChangeValue
- Inherits:
-
Object
- Object
- Cardigan::Command::ChangeValue
- Defined in:
- lib/cardigan/command/change_value.rb
Instance Method Summary collapse
- #execute(key) ⇒ Object
-
#initialize(entry, io) ⇒ ChangeValue
constructor
A new instance of ChangeValue.
Constructor Details
#initialize(entry, io) ⇒ ChangeValue
Returns a new instance of ChangeValue.
6 7 8 |
# File 'lib/cardigan/command/change_value.rb', line 6 def initialize entry, io @entry, @io = entry, io end |
Instance Method Details
#execute(key) ⇒ Object
10 11 12 |
# File 'lib/cardigan/command/change_value.rb', line 10 def execute key Cardigan::CardEditor.new(@entry, @io).set key, @io.ask("Enter the new value for #{key}") end |