Class: RedSnow::Blueprint
- Inherits:
-
NamedBlueprintNode
- Object
- BlueprintNode
- NamedBlueprintNode
- RedSnow::Blueprint
- Defined in:
- lib/redsnow/blueprint.rb
Overview
Top-level Blueprint AST node
represents 'blueprint section'
Constant Summary collapse
- VERSION_KEY =
Version key
:_version- SUPPORTED_VERSIONS =
Supported version of Api Blueprint
["2.0"]
Instance Attribute Summary collapse
-
#metadata ⇒ Metadata
tool-specific metadata collection or nil.
-
#resource_groups ⇒ Array<ResourceGroup>
array of blueprint resource groups.
Attributes inherited from NamedBlueprintNode
Instance Method Summary collapse
-
#initialize(handle) ⇒ Blueprint
constructor
A new instance of Blueprint.
Methods inherited from NamedBlueprintNode
Constructor Details
#initialize(handle) ⇒ Blueprint
Returns a new instance of Blueprint.
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/redsnow/blueprint.rb', line 388 def initialize(handle) # BP name, desc @name = RedSnow::Binding.sc_blueprint_name(handle) @description = RedSnow::Binding.sc_blueprint_description(handle) # BP metadata = RedSnow::Binding.(handle) = Metadata.new() # BP Resource Groups sc_resource_groups_collection_handle = RedSnow::Binding.sc_resource_groups_collection_handle(handle) sc_resource_groups_collection_size = RedSnow::Binding.sc_resource_groups_collection_size(sc_resource_groups_collection_handle) @resource_groups = Array.new if sc_resource_groups_collection_size > 0 group_size = sc_resource_groups_collection_size - 1 for index in 0..group_size do sc_resource_groups_handle = RedSnow::Binding.sc_resource_groups_handle(sc_resource_groups_collection_handle, index) @resource_groups << ResourceGroup.new(sc_resource_groups_handle) end end end |
Instance Attribute Details
#metadata ⇒ Metadata
tool-specific metadata collection or nil
376 377 378 |
# File 'lib/redsnow/blueprint.rb', line 376 def end |
#resource_groups ⇒ Array<ResourceGroup>
array of blueprint resource groups
376 377 378 |
# File 'lib/redsnow/blueprint.rb', line 376 def resource_groups @resource_groups end |