Class: RedSnow::Sourcemap::Blueprint

Inherits:
NamedNode show all
Defined in:
lib/redsnow/sourcemap.rb

Overview

Blueprint source map node

Instance Attribute Summary collapse

Attributes inherited from NamedNode

#description, #name

Attributes inherited from Node

#collection

Instance Method Summary collapse

Constructor Details

#initialize(sourcemap) ⇒ Blueprint

Returns a new instance of Blueprint.

Parameters:

  • sourcemap (json)


247
248
249
250
251
252
253
254
255
256
257
258
# File 'lib/redsnow/sourcemap.rb', line 247

def initialize(sourcemap)
  return if sourcemap.nil?

  super(sourcemap)

  @metadata = Metadata.new(sourcemap['metadata'])
  @resource_groups = []

  sourcemap.key?('resourceGroups') && sourcemap['resourceGroups'].each do |resource_group|
    @resource_groups << ResourceGroup.new(resource_group)
  end
end

Instance Attribute Details

#metadataMetadata

tool-specific metadata collection or nil

Returns:

  • (Metadata)

    the current value of metadata



242
243
244
# File 'lib/redsnow/sourcemap.rb', line 242

def 
  @metadata
end

#resource_groupsArray<ResourceGroup>

array of resource groups

Returns:

  • (Array<ResourceGroup>)

    the current value of resource_groups



242
243
244
# File 'lib/redsnow/sourcemap.rb', line 242

def resource_groups
  @resource_groups
end