Class: Tengu::CompositeMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/tengu/composite_matcher.rb

Instance Method Summary collapse

Instance Method Details

#<(value) ⇒ Object



15
16
17
# File 'lib/tengu/composite_matcher.rb', line 15

def < value
  Matcher.new("be less than #{value.inspect}") { |object| object < value }
end

#<=(value) ⇒ Object



19
20
21
# File 'lib/tengu/composite_matcher.rb', line 19

def <= value
  Matcher.new("be less than or equal to #{value.inspect}") { |object| object <= value }
end

#>(value) ⇒ Object



7
8
9
# File 'lib/tengu/composite_matcher.rb', line 7

def > value
  Matcher.new("be greater than #{value.inspect}") { |object| object > value }
end

#>=(value) ⇒ Object



11
12
13
# File 'lib/tengu/composite_matcher.rb', line 11

def >= value
  Matcher.new("be greater than or equal to #{value.inspect}") { |object| object >= value }
end

#matches?(object) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/tengu/composite_matcher.rb', line 3

def matches?(object)
  object
end