class MatterCompiler::Parameters

Collection of URI parameters Blueprint AST node

represents 'parameters section'

@attr collection [Array<Parameter>] an array of URI parameters

Attributes

collection[RW]

Public Instance Methods

load_ast!(ast) click to toggle source
# File lib/matter_compiler/blueprint.rb, line 242
def load_ast!(ast)
  return if ast.empty?

  @collection = Array.new
  ast.each do |item|
    @collection << Parameter.new(item)
  end      
end
serialize() click to toggle source
# File lib/matter_compiler/blueprint.rb, line 251
def serialize
  return "" if :collection.blank?
  
  buffer = "+ Parameters\n"
  @collection.each do |parameter|
    buffer << parameter.serialize
  end

  buffer << "\n" unless @collection.blank?
  buffer
end