Class: PactBroker::Api::Decorators::DecoratorContext

Inherits:
Hash
  • Object
show all
Defined in:
lib/pact_broker/api/decorators/decorator_context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_url, resource_url, options = {}) ⇒ DecoratorContext

Returns a new instance of DecoratorContext.



9
10
11
12
13
14
15
16
17
# File 'lib/pact_broker/api/decorators/decorator_context.rb', line 9

def initialize base_url, resource_url, options = {}
  @base_url = base_url
  self[:base_url] = base_url
  @resource_url = resource_url
  self[:resource_url] = resource_url
  @resource_title = options[:resource_title]
  self[:resource_title] = resource_title
  merge!(options)
end

Instance Attribute Details

#base_urlObject (readonly)

Returns the value of attribute base_url.



7
8
9
# File 'lib/pact_broker/api/decorators/decorator_context.rb', line 7

def base_url
  @base_url
end

#resource_titleObject (readonly)

Returns the value of attribute resource_title.



7
8
9
# File 'lib/pact_broker/api/decorators/decorator_context.rb', line 7

def resource_title
  @resource_title
end

#resource_urlObject (readonly)

Returns the value of attribute resource_url.



7
8
9
# File 'lib/pact_broker/api/decorators/decorator_context.rb', line 7

def resource_url
  @resource_url
end

Instance Method Details

#to_sObject



19
20
21
# File 'lib/pact_broker/api/decorators/decorator_context.rb', line 19

def to_s
  "DecoratorContext #{super}"
end