Class: RulerCoaster::Operator::Empty

Inherits:
Base
  • Object
show all
Defined in:
lib/ruler_coaster/operator/empty.rb

Direct Known Subclasses

NotEmpty

Instance Attribute Summary

Attributes inherited from Base

#assert_value

Instance Method Summary collapse

Constructor Details

#initialize(*_args) ⇒ Empty

Returns a new instance of Empty.



4
5
6
# File 'lib/ruler_coaster/operator/empty.rb', line 4

def initialize(*_args)
  super(nil)
end

Instance Method Details

#call(value) ⇒ Object



8
9
10
# File 'lib/ruler_coaster/operator/empty.rb', line 8

def call(value)
  value.to_s.empty?
end