Sha256: 61a89e326d73aa2c4000ef43e4eea7675d70415ecadcf25922b6b439d11654ee

Contents?: true

Size: 433 Bytes

Versions: 7

Compression:

Stored size: 433 Bytes

Contents

require 'ec2ssh/dsl'

module Ec2ssh
  module Command
    class Base
      attr_reader :cli

      def initialize(cli)
        @cli = cli
      end

      def dotfile
        @dotfile ||= Ec2ssh::Dsl::Parser.parse_file(dotfile_path)
      end

      def ssh_config_path
        cli.options.path || dotfile.path || "#{$ENV['HOME']}/.ssh/config"
      end

      def dotfile_path
        cli.options.dotfile
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ec2ssh-3.1.0.rc2 lib/ec2ssh/command.rb
ec2ssh-3.1.0.rc1 lib/ec2ssh/command.rb
ec2ssh-3.0.3 lib/ec2ssh/command.rb
ec2ssh-3.0.2 lib/ec2ssh/command.rb
ec2ssh-3.0.1 lib/ec2ssh/command.rb
ec2ssh-3.0.0 lib/ec2ssh/command.rb
ec2ssh-3.0.0.beta1 lib/ec2ssh/command.rb