Class: Pact::Matchers::UnixDiffFormatter::RegexpDecorator

Inherits:
Object
  • Object
show all
Defined in:
lib/pact/matchers/unix_diff_formatter.rb

Instance Method Summary collapse

Constructor Details

#initialize(regexp) ⇒ RegexpDecorator

Returns a new instance of RegexpDecorator.



142
143
144
# File 'lib/pact/matchers/unix_diff_formatter.rb', line 142

def initialize regexp
  @regexp = regexp
end

Instance Method Details

#as_jsonObject



150
151
152
# File 'lib/pact/matchers/unix_diff_formatter.rb', line 150

def as_json
  @regexp.inspect
end

#to_json(options = {}) ⇒ Object



146
147
148
# File 'lib/pact/matchers/unix_diff_formatter.rb', line 146

def to_json options = {}
  @regexp.inspect
end