Class: Warp::Dir::Command::Warp

Inherits:
Warp::Dir::Command show all
Defined in:
lib/warp/dir/command/warp.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



11
12
13
14
15
16
17
18
19
20
# File 'lib/warp/dir/command/warp.rb', line 11

def run(*args)
  if point.nil? && point_name
    self.point = store[point_name]
  end
  raise ::Warp::Dir::Errors::PointNotFound.new(point) unless point
  p = point
  on :shell do
    message "cd #{p.absolute_path}"
  end
end