Class: Pact::ServiceConsumer
- Inherits:
-
Object
- Object
- Pact::ServiceConsumer
show all
- Includes:
- SymbolizeKeys
- Defined in:
- lib/pact/consumer_contract/service_consumer.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
included, #symbolize_keys
Constructor Details
Returns a new instance of ServiceConsumer.
8
9
10
|
# File 'lib/pact/consumer_contract/service_consumer.rb', line 8
def initialize options
@name = options[:name]
end
|
Instance Attribute Details
#name ⇒ Object
7
8
9
|
# File 'lib/pact/consumer_contract/service_consumer.rb', line 7
def name
@name
end
|
Class Method Details
.from_hash(hash) ⇒ Object
24
25
26
|
# File 'lib/pact/consumer_contract/service_consumer.rb', line 24
def self.from_hash hash
new(symbolize_keys(hash))
end
|
Instance Method Details
#as_json(options = {}) ⇒ Object
20
21
22
|
# File 'lib/pact/consumer_contract/service_consumer.rb', line 20
def as_json options = {}
to_hash
end
|
#to_hash ⇒ Object
16
17
18
|
# File 'lib/pact/consumer_contract/service_consumer.rb', line 16
def to_hash
{name: name}
end
|
#to_s ⇒ Object
12
13
14
|
# File 'lib/pact/consumer_contract/service_consumer.rb', line 12
def to_s
name
end
|