Class: Composer::Verify::Region
- Inherits:
-
Object
- Object
- Composer::Verify::Region
- Defined in:
- lib/composer/verify/region.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Region
constructor
A new instance of Region.
- #verify ⇒ Object
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
#verify ⇒ Object
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 |