Method: RTPush::PresenceValidator#exist

Defined in:
lib/rtpush/adapters/base_adapter.rb

#exist(record) ⇒ Object



51
52
53
54
55
56
57
58
# File 'lib/rtpush/adapters/base_adapter.rb', line 51

def exist(record)
  @attributes.each do |attribute|
    data = ENV[attribute.to_s]
    if data.nil? || data.empty?
      record.errors << ["#{attribute} can't be empty"]
    end
  end
end