Class: Higan::Remote
- Inherits:
-
Object
- Object
- Higan::Remote
- Defined in:
- lib/higan/remote.rb
Instance Attribute Summary collapse
-
#base_dir ⇒ Object
Returns the value of attribute base_dir.
-
#host ⇒ Object
Returns the value of attribute host.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#password ⇒ Object
Returns the value of attribute password.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(**params) ⇒ Remote
constructor
A new instance of Remote.
- #remote_path(path) ⇒ Object
- #to_h ⇒ Object
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_dir ⇒ Object
Returns the value of attribute base_dir.
3 4 5 |
# File 'lib/higan/remote.rb', line 3 def base_dir @base_dir end |
#host ⇒ Object
Returns the value of attribute host.
3 4 5 |
# File 'lib/higan/remote.rb', line 3 def host @host end |
#mode ⇒ Object
Returns the value of attribute mode.
3 4 5 |
# File 'lib/higan/remote.rb', line 3 def mode @mode end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/higan/remote.rb', line 3 def password @password end |
#user ⇒ Object
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_h ⇒ Object
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 |