Class: Ec2ssh::Command::Base
- Inherits:
-
Object
- Object
- Ec2ssh::Command::Base
show all
- Defined in:
- lib/ec2ssh/command.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(cli) ⇒ Base
Returns a new instance of Base.
8
9
10
|
# File 'lib/ec2ssh/command.rb', line 8
def initialize(cli)
@cli = cli
end
|
Instance Attribute Details
#cli ⇒ Object
Returns the value of attribute cli.
6
7
8
|
# File 'lib/ec2ssh/command.rb', line 6
def cli
@cli
end
|
Instance Method Details
#dotfile ⇒ Object
12
13
14
|
# File 'lib/ec2ssh/command.rb', line 12
def dotfile
@dotfile ||= Ec2ssh::Dsl::Parser.parse_file(dotfile_path)
end
|
#dotfile_path ⇒ Object
20
21
22
|
# File 'lib/ec2ssh/command.rb', line 20
def dotfile_path
cli.options.dotfile
end
|
#ssh_config_path ⇒ Object
16
17
18
|
# File 'lib/ec2ssh/command.rb', line 16
def ssh_config_path
cli.options.path || dotfile.path || "#{ENV['HOME']}/.ssh/config"
end
|