Class: Pact::ExpectedType
Instance Method Summary
collapse
#eql?
#fix_all_the_things, #fix_json_formatting, #fix_regexp, #remove_unicode, #warn_about_regexp
Constructor Details
Returns a new instance of ExpectedType.
6
7
8
|
# File 'lib/pact/matchers/expected_type.rb', line 6
def initialize value
@value = value
end
|
Instance Method Details
#==(other) ⇒ Object
26
27
28
|
# File 'lib/pact/matchers/expected_type.rb', line 26
def == other
eq? other
end
|
#as_json(options = {}) ⇒ Object
18
19
20
|
# File 'lib/pact/matchers/expected_type.rb', line 18
def as_json options = {}
type
end
|
#eq?(other) ⇒ Boolean
22
23
24
|
# File 'lib/pact/matchers/expected_type.rb', line 22
def eq? other
self.class == other.class && other.type == type
end
|
#to_json(options = {}) ⇒ Object
14
15
16
|
# File 'lib/pact/matchers/expected_type.rb', line 14
def to_json options = {}
type
end
|
#to_s ⇒ Object
30
31
32
|
# File 'lib/pact/matchers/expected_type.rb', line 30
def to_s
type
end
|
#type ⇒ Object
10
11
12
|
# File 'lib/pact/matchers/expected_type.rb', line 10
def type
@value.class.name
end
|