class Ec2ssh::Dsl

Constants

CREDENTIAL_CLASSES

Attributes

_result[R]

Public Class Methods

new() click to toggle source
# File lib/ec2ssh/dsl.rb, line 11
def initialize
  @_result = Container.new
end

Public Instance Methods

aws_keys(keys) click to toggle source
# File lib/ec2ssh/dsl.rb, line 15
    def aws_keys(keys)
      unless keys.all? {|_, v| v.is_a?(Hash) && v.each_value.all? {|c| CREDENTIAL_CLASSES.any?(&c.method(:is_a?)) } }
        raise DotfileValidationError, <<-MSG
Since v4.0, `aws_keys` in the dotfile must be specified regions as a hash key.
See: https://github.com/mirakui/ec2ssh#how-to-upgrade-from-3x
        MSG
      end
      @_result.aws_keys = keys
    end
filters(filters) click to toggle source
# File lib/ec2ssh/dsl.rb, line 41
def filters(filters)
  @_result.filters = filters
end
host_line(erb) click to toggle source
# File lib/ec2ssh/dsl.rb, line 33
def host_line(erb)
  @_result.host_line = erb
end
path(str) click to toggle source
# File lib/ec2ssh/dsl.rb, line 45
def path(str)
  @_result.path = str
end
profiles(*profiles) click to toggle source
# File lib/ec2ssh/dsl.rb, line 25
def profiles(*profiles)
  @_result.profiles = profiles
end
regions(*regions) click to toggle source
# File lib/ec2ssh/dsl.rb, line 29
def regions(*regions)
  @_result.regions = regions
end
reject(&block) click to toggle source
# File lib/ec2ssh/dsl.rb, line 37
def reject(&block)
  @_result.reject = block
end