Class: PactBroker::Api::Decorators::DecoratorContext
- Inherits:
-
Hash
- Object
- Hash
- PactBroker::Api::Decorators::DecoratorContext
- Defined in:
- lib/pact_broker/api/decorators/decorator_context.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#resource_title ⇒ Object
readonly
Returns the value of attribute resource_title.
-
#resource_url ⇒ Object
readonly
Returns the value of attribute resource_url.
Instance Method Summary collapse
-
#initialize(base_url, resource_url, env, options = {}) ⇒ DecoratorContext
constructor
A new instance of DecoratorContext.
- #to_s ⇒ Object
Constructor Details
#initialize(base_url, resource_url, env, options = {}) ⇒ DecoratorContext
Returns a new instance of DecoratorContext.
8 9 10 11 12 13 14 |
# File 'lib/pact_broker/api/decorators/decorator_context.rb', line 8 def initialize base_url, resource_url, env, = {} @base_url = self[:base_url] = base_url @resource_url = self[:resource_url] = resource_url @resource_title = self[:resource_title] = [:resource_title] @env = self[:env] = env merge!() end |
Instance Attribute Details
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
6 7 8 |
# File 'lib/pact_broker/api/decorators/decorator_context.rb', line 6 def base_url @base_url end |
#env ⇒ Object (readonly)
Returns the value of attribute env.
6 7 8 |
# File 'lib/pact_broker/api/decorators/decorator_context.rb', line 6 def env @env end |
#resource_title ⇒ Object (readonly)
Returns the value of attribute resource_title.
6 7 8 |
# File 'lib/pact_broker/api/decorators/decorator_context.rb', line 6 def resource_title @resource_title end |
#resource_url ⇒ Object (readonly)
Returns the value of attribute resource_url.
6 7 8 |
# File 'lib/pact_broker/api/decorators/decorator_context.rb', line 6 def resource_url @resource_url end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/pact_broker/api/decorators/decorator_context.rb', line 16 def to_s "DecoratorContext #{super}" end |