Class: Ec2ssh::Command::Base
- Inherits:
-
Object
- Object
- Ec2ssh::Command::Base
- Defined in:
- lib/ec2ssh/command.rb
Instance Attribute Summary collapse
-
#cli ⇒ Object
readonly
Returns the value of attribute cli.
Instance Method Summary collapse
- #dotfile ⇒ Object
- #dotfile_path ⇒ Object
-
#initialize(cli) ⇒ Base
constructor
A new instance of Base.
- #ssh_config_path ⇒ Object
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 (readonly)
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..dotfile end |
#ssh_config_path ⇒ Object
16 17 18 |
# File 'lib/ec2ssh/command.rb', line 16 def ssh_config_path cli..path || dotfile.path || "#{ENV['HOME']}/.ssh/config" end |