Class: DrawCloud::WaitHandle::WaitCondition
- Inherits:
-
Object
- Object
- DrawCloud::WaitHandle::WaitCondition
- Defined in:
- lib/draw_cloud/wait_handle.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#depends_on ⇒ Object
Returns the value of attribute depends_on.
-
#handle ⇒ Object
Returns the value of attribute handle.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(handle, timeout, count, depends_on) ⇒ WaitCondition
constructor
A new instance of WaitCondition.
- #resource_name ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(handle, timeout, count, depends_on) ⇒ WaitCondition
Returns a new instance of WaitCondition.
23 24 25 26 27 28 |
# File 'lib/draw_cloud/wait_handle.rb', line 23 def initialize(handle, timeout, count, depends_on) @handle = handle @timeout = timeout @count = count @depends_on = depends_on end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
22 23 24 |
# File 'lib/draw_cloud/wait_handle.rb', line 22 def count @count end |
#depends_on ⇒ Object
Returns the value of attribute depends_on.
22 23 24 |
# File 'lib/draw_cloud/wait_handle.rb', line 22 def depends_on @depends_on end |
#handle ⇒ Object
Returns the value of attribute handle.
22 23 24 |
# File 'lib/draw_cloud/wait_handle.rb', line 22 def handle @handle end |
#timeout ⇒ Object
Returns the value of attribute timeout.
22 23 24 |
# File 'lib/draw_cloud/wait_handle.rb', line 22 def timeout @timeout end |
Instance Method Details
#resource_name ⇒ Object
30 31 32 |
# File 'lib/draw_cloud/wait_handle.rb', line 30 def resource_name DrawCloud.resource_name(handle) + "Condition" end |
#to_h ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/draw_cloud/wait_handle.rb', line 34 def to_h h = { "Type" => "AWS::CloudFormation::WaitCondition", "Properties" => { "Handle" => DrawCloud.ref(handle), "Timeout" => timeout } } h["DependsOn"] = DrawCloud.resource_name(depends_on) if depends_on h["Properties"]["Count"] = count unless count.nil? h end |