demarches-normaliennes/app/models/logic/empty.rb
simon lehericey 43f926a1de to_s
2022-09-28 10:06:31 +02:00

25 lines
369 B
Ruby

class Logic::Empty < Logic::Term
def to_s(_type_de_champs = []) = I18n.t('logic.empty')
def type(_type_de_champs = []) = :empty
def errors(_type_de_champs = []) = ['empty']
def to_h
{
"term" => self.class.name
}
end
def self.from_h(_h)
self.new
end
def ==(other)
self.class == other.class
end
def value
nil
end
end