Class: Inspector::Constraints::Empty
Instance Method Summary
collapse
#negate!, #positive?, #validator
Instance Method Details
#inspect ⇒ Object
16
17
18
|
# File 'lib/inspector/constraints/empty.rb', line 16
def inspect
"#<empty>"
end
|
#to_s ⇒ Object
12
13
14
|
# File 'lib/inspector/constraints/empty.rb', line 12
def to_s
"be_empty"
end
|
#valid?(actual) ⇒ Boolean
6
7
8
9
10
|
# File 'lib/inspector/constraints/empty.rb', line 6
def valid?(actual)
actual = actual.to_s unless actual.respond_to?(:empty?)
actual.empty?
end
|