Class: RedSnow::Metadata
- Inherits:
-
KeyValueCollection
- Object
- BlueprintNode
- KeyValueCollection
- RedSnow::Metadata
- Defined in:
- lib/redsnow/blueprint.rb
Overview
Metadata collection Blueprint AST node
represents 'metadata section'
Instance Attribute Summary
Attributes inherited from KeyValueCollection
Instance Method Summary collapse
-
#initialize(metadata) ⇒ Metadata
constructor
A new instance of Metadata.
Methods inherited from KeyValueCollection
Constructor Details
#initialize(metadata) ⇒ Metadata
Returns a new instance of Metadata.
91 92 93 94 95 96 97 98 |
# File 'lib/redsnow/blueprint.rb', line 91 def initialize() return if .nil? @collection = [] .each do |item| @collection << Hash[name: item['name'], value: item.fetch('value', nil)] end end |