Class: Warp::Dir::Command::Add
- Inherits:
-
Warp::Dir::Command
- Object
- Warp::Dir::Command
- Warp::Dir::Command::Add
- Defined in:
- lib/warp/dir/command/add.rb
Instance Attribute Summary
Attributes inherited from Warp::Dir::Command
#formatter, #point, #point_name, #point_path, #store
Instance Method Summary collapse
Methods inherited from Warp::Dir::Command
command_name, #config, help, inherited, #initialize, #inspect, installed_commands, #needs_point?, #on, #puts
Constructor Details
This class inherits a constructor from Warp::Dir::Command
Instance Method Details
#run(*args) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/warp/dir/command/add.rb', line 8 def run(*args) self.point_path ||= Dir.pwd store.insert point_name: point_name, point_path: point_path, overwrite: config.force on :success do 'Warp point saved!' end end |