Class: Dam::ParamsProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/dam/stream.rb

Overview

a class that will allow us to note which param has been used from the placeholders

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ ParamsProxy

Returns a new instance of ParamsProxy.



34
35
36
# File 'lib/dam/stream.rb', line 34

def initialize(key)
  @key = key
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



33
34
35
# File 'lib/dam/stream.rb', line 33

def key
  @key
end

Class Method Details

.[](key) ⇒ Object



38
39
40
# File 'lib/dam/stream.rb', line 38

def self.[] key
  ParamsProxy.new(key)
end