Class: RedSnow::Sourcemap::Parameters

Inherits:
Node
  • Object
show all
Defined in:
lib/redsnow/sourcemap.rb

Overview

Parameters source map collection node

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sourcemap) ⇒ Parameters

Returns a new instance of Parameters.

Parameters:

  • sourcemap (json)


105
106
107
108
109
110
111
112
113
# File 'lib/redsnow/sourcemap.rb', line 105

def initialize(sourcemap)
  @collection = []

  return if sourcemap.nil?

  sourcemap.each do |parameter|
    @collection << Parameter.new(parameter)
  end
end

Instance Attribute Details

#collectionArray<Parameter>

an array of URI parameters

Returns:

  • (Array<Parameter>)

    the current value of collection



103
104
105
# File 'lib/redsnow/sourcemap.rb', line 103

def collection
  @collection
end