Class: Bookmark::Bookmark
- Inherits:
-
Object
- Object
- Bookmark::Bookmark
- Defined in:
- lib/bookmark.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options) ⇒ Bookmark
constructor
A new instance of Bookmark.
- #save! ⇒ Object
Constructor Details
#initialize(options) ⇒ Bookmark
Returns a new instance of Bookmark.
6 7 8 9 10 11 12 13 |
# File 'lib/bookmark.rb', line 6 def initialize() @name = [:name] @command = [:command] @path = [:path] @alias = "alias #{@name}='cd #{@path}" @alias << " && #{@command}" if @command @alias << "'" end |
Class Method Details
.shell_rc ⇒ Object
24 25 26 |
# File 'lib/bookmark.rb', line 24 def self.shell_rc File.join(ENV['HOME'], ".#{File.basename(ENV['SHELL'])}rc") end |