Class: HttpStub::Configurer::DSL::RequestAttributeReferencer

Inherits:
Object
  • Object
show all
Defined in:
lib/http_stub/configurer/dsl/request_attribute_referencer.rb

Instance Method Summary collapse

Constructor Details

#initialize(attribute_type) ⇒ RequestAttributeReferencer

Returns a new instance of RequestAttributeReferencer.



7
8
9
# File 'lib/http_stub/configurer/dsl/request_attribute_referencer.rb', line 7

def initialize(attribute_type)
  @attribute_type = attribute_type
end

Instance Method Details

#[](name) ⇒ Object



11
12
13
# File 'lib/http_stub/configurer/dsl/request_attribute_referencer.rb', line 11

def [](name)
  "control:request.#{@attribute_type}[#{name}]"
end