Class: CfnEvents::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/cfn-events/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

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_clientObject

Stronger builder pattern would be nice



5
6
7
# File 'lib/cfn-events/config.rb', line 5

def cfn_client
  @cfn_client
end

#client_optionsObject

Stronger builder pattern would be nice



5
6
7
# File 'lib/cfn-events/config.rb', line 5

def client_options
  @client_options
end

#foreverObject

Stronger builder pattern would be nice



5
6
7
# File 'lib/cfn-events/config.rb', line 5

def forever
  @forever
end

#output_jsonObject

Stronger builder pattern would be nice



5
6
7
# File 'lib/cfn-events/config.rb', line 5

def output_json
  @output_json
end

#poll_secondsObject

Stronger builder pattern would be nice



5
6
7
# File 'lib/cfn-events/config.rb', line 5

def poll_seconds
  @poll_seconds
end

#sinceObject

Stronger builder pattern would be nice



5
6
7
# File 'lib/cfn-events/config.rb', line 5

def since
  @since
end

#stack_name_or_idObject

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

#waitObject

Stronger builder pattern would be nice



5
6
7
# File 'lib/cfn-events/config.rb', line 5

def wait
  @wait
end

Instance Method Details

#buildObject



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