Class: AWS::Logger
- Inherits:
-
Object
- Object
- AWS::Logger
- Defined in:
- lib/aws-vpccreate.rb
Instance Attribute Summary collapse
-
#config_log ⇒ Object
readonly
Returns the value of attribute config_log.
Instance Method Summary collapse
-
#initialize ⇒ Logger
constructor
A new instance of Logger.
- #put(hash) ⇒ Object
Constructor Details
#initialize ⇒ Logger
Returns a new instance of Logger.
10 11 12 13 14 15 |
# File 'lib/aws-vpccreate.rb', line 10 def initialize @config_log = { :vpc => { :vpc_subnet => "", :vpc_id => "", :subnets => [], :security_group => []}} end |
Instance Attribute Details
#config_log ⇒ Object (readonly)
Returns the value of attribute config_log.
8 9 10 |
# File 'lib/aws-vpccreate.rb', line 8 def config_log @config_log end |
Instance Method Details
#put(hash) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/aws-vpccreate.rb', line 17 def put hash if hash[:key] == :vpc_subnet @config_log[:vpc][hash[:key]] = hash[:value] elsif hash[:key] == :vpc_id @config_log[:vpc][hash[:key]] = hash[:value] else @config_log[:vpc][hash[:key]].push hash[:value] end end |