Class: Composer::Verify::Region

Inherits:
Object
  • Object
show all
Defined in:
lib/composer/verify/region.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Region

Returns a new instance of Region.



4
5
6
7
# File 'lib/composer/verify/region.rb', line 4

def initialize(args)
  @config = args[:config]
  @logger = @config.logger
end

Instance Method Details

#verifyObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/composer/verify/region.rb', line 9

def verify
  region = @config.region

  @logger.debug "Valid Regions: #{valid_regions.join ', '}"

  unless valid_regions.include? region
    raise InvalidRegion.new "Region '#{region}' is not valid."
  end

  @logger.info "Region '#{region}' is valid."
end