demarches-normaliennes/app/models/logic/empty.rb

26 lines
322 B
Ruby
Raw Normal View History

2022-06-09 11:54:29 +02:00
class Logic::Empty < Logic::Term
2022-06-27 12:32:00 +02:00
def to_s = I18n.t('logic.empty')
2022-06-09 11:54:29 +02:00
def type = :empty
def errors(_stable_ids = nil) = ['empty']
def to_h
{
"term" => self.class.name
2022-06-09 11:54:29 +02:00
}
end
def self.from_h(_h)
self.new
2022-06-09 11:54:29 +02:00
end
def ==(other)
self.class == other.class
end
2022-06-27 16:21:30 +02:00
def value
nil
end
2022-06-09 11:54:29 +02:00
end