Class: Pact::Provider::Help::PactDiff
- Inherits:
-
Object
- Object
- Pact::Provider::Help::PactDiff
- Defined in:
- lib/pact/provider/help/pact_diff.rb
Defined Under Namespace
Classes: PrintPactDiffError
Instance Attribute Summary collapse
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#pact_source ⇒ Object
readonly
Returns the value of attribute pact_source.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(pact_source) ⇒ PactDiff
constructor
A new instance of PactDiff.
Constructor Details
#initialize(pact_source) ⇒ PactDiff
Returns a new instance of PactDiff.
11 12 13 |
# File 'lib/pact/provider/help/pact_diff.rb', line 11 def initialize pact_source @pact_source = pact_source end |
Instance Attribute Details
#output ⇒ Object (readonly)
Returns the value of attribute output.
9 10 11 |
# File 'lib/pact/provider/help/pact_diff.rb', line 9 def output @output end |
#pact_source ⇒ Object (readonly)
Returns the value of attribute pact_source.
9 10 11 |
# File 'lib/pact/provider/help/pact_diff.rb', line 9 def pact_source @pact_source end |
Class Method Details
.call(pact_source) ⇒ Object
15 16 17 |
# File 'lib/pact/provider/help/pact_diff.rb', line 15 def self.call pact_source new(pact_source).call end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/pact/provider/help/pact_diff.rb', line 19 def call begin header + "\n" + get_diff rescue PrintPactDiffError => e return e. end end |