Class: Higan::Remote

Inherits:
Object
  • Object
show all
Defined in:
lib/higan/remote.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**params) ⇒ Remote

Returns a new instance of Remote.



5
6
7
8
9
# File 'lib/higan/remote.rb', line 5

def initialize(**params)
  params.each_pair do |k, v|
    self.send("#{k}=", v)
  end
end

Instance Attribute Details

#base_dirObject

Returns the value of attribute base_dir.



3
4
5
# File 'lib/higan/remote.rb', line 3

def base_dir
  @base_dir
end

#hostObject

Returns the value of attribute host.



3
4
5
# File 'lib/higan/remote.rb', line 3

def host
  @host
end

#modeObject

Returns the value of attribute mode.



3
4
5
# File 'lib/higan/remote.rb', line 3

def mode
  @mode
end

#passwordObject

Returns the value of attribute password.



3
4
5
# File 'lib/higan/remote.rb', line 3

def password
  @password
end

#userObject

Returns the value of attribute user.



3
4
5
# File 'lib/higan/remote.rb', line 3

def user
  @user
end

Instance Method Details

#remote_path(path) ⇒ Object



11
12
13
# File 'lib/higan/remote.rb', line 11

def remote_path(path)
  base_dir + path
end

#to_hObject



15
16
17
18
19
20
21
22
23
# File 'lib/higan/remote.rb', line 15

def to_h
  {
    host: host,
    user: user,
    password: password,
    mode: mode,
    base_dir: base_dir
  }
end