Class: CfnEvents::Config
- Inherits:
-
Object
- Object
- CfnEvents::Config
- Defined in:
- lib/cfn-events/config.rb
Instance Attribute Summary collapse
-
#cfn_client ⇒ Object
Stronger builder pattern would be nice.
-
#client_options ⇒ Object
Stronger builder pattern would be nice.
-
#forever ⇒ Object
Stronger builder pattern would be nice.
-
#output_json ⇒ Object
Stronger builder pattern would be nice.
-
#poll_seconds ⇒ Object
Stronger builder pattern would be nice.
-
#since ⇒ Object
Stronger builder pattern would be nice.
-
#stack_name_or_id ⇒ Object
Stronger builder pattern would be nice.
-
#wait ⇒ Object
Stronger builder pattern would be nice.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
10 11 12 13 14 15 16 17 |
# File 'lib/cfn-events/config.rb', line 10 def initialize @client_options = {} @since = nil @output_json = false @wait = false @forever = false @poll_seconds = 5 end |
Instance Attribute Details
#cfn_client ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/cfn-events/config.rb', line 5 def cfn_client @cfn_client end |
#client_options ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/cfn-events/config.rb', line 5 def @client_options end |
#forever ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/cfn-events/config.rb', line 5 def forever @forever end |
#output_json ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/cfn-events/config.rb', line 5 def output_json @output_json end |
#poll_seconds ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/cfn-events/config.rb', line 5 def poll_seconds @poll_seconds end |
#since ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/cfn-events/config.rb', line 5 def since @since end |
#stack_name_or_id ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/cfn-events/config.rb', line 5 def stack_name_or_id @stack_name_or_id end |
#wait ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/cfn-events/config.rb', line 5 def wait @wait end |
Instance Method Details
#build ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/cfn-events/config.rb', line 19 def build if !@stack_name_or_id raise "Missing stack_name_or_id" end if @wait and @forever raise "wait and forever cannot be combined" end self end |