Class: RedSnow::Parameters

Inherits:
BlueprintNode show all
Defined in:
lib/redsnow/blueprint.rb

Overview

Collection of URI parameters Blueprint AST node

represents 'parameters section'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parameters) ⇒ Parameters

Returns a new instance of Parameters.

Parameters:

  • parameters (json)


175
176
177
178
179
180
181
182
183
# File 'lib/redsnow/blueprint.rb', line 175

def initialize(parameters)
  @collection = []

  return if parameters.nil?

  parameters.each do |item|
    @collection << Parameter.new(item)
  end
end

Instance Attribute Details

#collectionArray<Parameter>

an array of URI parameters

Returns:

  • (Array<Parameter>)

    the current value of collection



171
172
173
# File 'lib/redsnow/blueprint.rb', line 171

def collection
  @collection
end