Class: Kelbim::DSL::EC2::LoadBalancer::Attributes

Inherits:
Object
  • Object
show all
Includes:
Checker
Defined in:
lib/kelbim/dsl/attributes.rb

Instance Method Summary collapse

Constructor Details

#initialize(load_balancer, &block) ⇒ Attributes

Returns a new instance of Attributes.



11
12
13
14
15
# File 'lib/kelbim/dsl/attributes.rb', line 11

def initialize(load_balancer, &block)
  @error_identifier = "LoadBalancer `#{load_balancer}`"
  @result = {}
  instance_eval(&block)
end

Instance Method Details

#cross_zone_load_balancing(value) ⇒ Object



22
23
24
25
26
27
# File 'lib/kelbim/dsl/attributes.rb', line 22

def cross_zone_load_balancing(value)
  call_once(:cross_zone_load_balancing)
  expected_type(value, Hash)
  expected_length(value, 1)
  @result[:cross_zone_load_balancing] = value
end

#resultObject



17
18
19
20
# File 'lib/kelbim/dsl/attributes.rb', line 17

def result
  required(:cross_zone_load_balancing, @result[:cross_zone_load_balancing])
  @result
end