Class: Pact::Provider::VerificationReport
- Inherits:
-
Object
- Object
- Pact::Provider::VerificationReport
- Includes:
- FileName
- Defined in:
- lib/pact/provider/verification_report.rb
Instance Method Summary collapse
- #as_json(options = {}) ⇒ Object
-
#initialize(options) ⇒ VerificationReport
constructor
A new instance of VerificationReport.
- #report_file_name ⇒ Object
- #to_hash ⇒ Object
- #to_json(options = {}) ⇒ Object
Methods included from FileName
Constructor Details
#initialize(options) ⇒ VerificationReport
Returns a new instance of VerificationReport.
8 9 10 11 12 13 |
# File 'lib/pact/provider/verification_report.rb', line 8 def initialize () @consumer = [:consumer] @provider = [:provider] @result = [:result] @output = [:output] end |
Instance Method Details
#as_json(options = {}) ⇒ Object
24 25 26 |
# File 'lib/pact/provider/verification_report.rb', line 24 def as_json = {} to_hash end |
#report_file_name ⇒ Object
32 33 34 |
# File 'lib/pact/provider/verification_report.rb', line 32 def report_file_name file_name("#{@consumer[:name]}_#{@consumer[:ref]}", "#{@provider[:name]}_#{@provider[:ref]}") end |
#to_hash ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/pact/provider/verification_report.rb', line 15 def to_hash { :consumer => @consumer, :provider => @provider, :result => @result, :output => @output } end |
#to_json(options = {}) ⇒ Object
28 29 30 |
# File 'lib/pact/provider/verification_report.rb', line 28 def to_json( = {}) as_json.to_json() end |