Class: RedSnow::ResourceGroup
- Inherits:
-
NamedBlueprintNode
- Object
- BlueprintNode
- NamedBlueprintNode
- RedSnow::ResourceGroup
- Defined in:
- lib/redsnow/blueprint.rb
Overview
Resource group Blueprint AST node represents 'resource group section'
Instance Attribute Summary (collapse)
-
- (String) description
inherited
from NamedBlueprintNode
description of the node.
-
- (String) name
inherited
from NamedBlueprintNode
name of the node.
-
- (Array<Resource>) resources
array of resources in the group.
Instance Method Summary (collapse)
-
- (ResourceGroup) initialize(sc_resource_groups_handle)
constructor
A new instance of ResourceGroup.
Constructor Details
- (ResourceGroup) initialize(sc_resource_groups_handle)
Returns a new instance of ResourceGroup
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/redsnow/blueprint.rb', line 309 def initialize(sc_resource_groups_handle) @name = RedSnow::Binding.sc_resource_groups_name(sc_resource_groups_handle) @description = RedSnow::Binding.sc_resource_groups_description(sc_resource_groups_handle) @resources = Array.new sc_resource_collection_handle = RedSnow::Binding.sc_resource_collection_handle(sc_resource_groups_handle) sc_resource_collection_size = RedSnow::Binding.sc_resource_collection_size(sc_resource_collection_handle) if sc_resource_collection_size > 0 resource_size = sc_resource_collection_size - 1 for index in 0..resource_size do sc_resource_handle = RedSnow::Binding.sc_resource_handle(sc_resource_collection_handle, index) res = Resource.new(sc_resource_handle) end end @resources << res end |
Instance Attribute Details
- (String) description Originally defined in class NamedBlueprintNode
description of the node
- (String) name Originally defined in class NamedBlueprintNode
name of the node
- (Array<Resource>) resources
array of resources in the group
305 306 307 |
# File 'lib/redsnow/blueprint.rb', line 305 def resources @resources end |