class Convection::Model::Attributes::Stack

Attributes

outputs[RW]
parameters[R]
resources[RW]

Public Class Methods

new() click to toggle source
# File lib/convection/model/attributes.rb, line 12
def initialize
  @resources = {}
  @outputs = {}
  @parameters = {}
end

Public Instance Methods

[](key) click to toggle source
# File lib/convection/model/attributes.rb, line 30
def [](key)
  @parameters[key.to_s] || @outputs[key.to_s] || @resources[key.to_s]
end
[]=(key, value) click to toggle source
# File lib/convection/model/attributes.rb, line 34
def []=(key, value)
  @parameters[key.to_s] = value
end
fetch(key, default = nil) click to toggle source
# File lib/convection/model/attributes.rb, line 22
def fetch(key, default = nil)
  @parameters.fetch(key.to_s) do
    @outputs.fetch(key.to_s) do
      @resources.fetch(key.to_s, default)
    end
  end
end
include?(key) click to toggle source
# File lib/convection/model/attributes.rb, line 18
def include?(key)
  @parameters.include?(key) || @outputs.include?(key) || @resources.include?(key)
end