Module: SSHP::Alias

Defined in:
lib/sshp/alias.rb

Class Method Summary collapse

Class Method Details

.allObject



10
11
12
13
14
# File 'lib/sshp/alias.rb', line 10

def self.all
  @all ||= YAML.load File.open filename, "r"
rescue Errno::ENOENT
  @all = {}
end

.create_or_update_by_name(name, args) ⇒ Object



5
6
7
8
# File 'lib/sshp/alias.rb', line 5

def self.create_or_update_by_name name, args
  all[name] = args
  save
end