Sha256: 4fb2e0a1474df1ac4fe204f1d3b439bfa2aa04654e8735b74d2794af0ef809af

Contents?: true

Size: 396 Bytes

Versions: 11

Compression:

Stored size: 396 Bytes

Contents

module Helper
  def validates_presence_of(attribute, message=nil)
    raise ArgumentError, message || "Missing parameter", caller \
       if attribute.nil?
  end
  module_function :validates_presence_of

  def validates_not_empty(attribute, message=nil)
    raise ArgumentError, message || "Parameter is empty", caller \
       if attribute.nil?
  end
  module_function :validates_not_empty
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
depengine-3.0.12 lib/depengine/helper/validations.rb
depengine-3.0.11 lib/depengine/helper/validations.rb
depengine-3.0.10 lib/depengine/helper/validations.rb
depengine-3.0.9 lib/depengine/helper/validations.rb
depengine-3.0.8 lib/depengine/helper/validations.rb
depengine-3.0.7 lib/depengine/helper/validations.rb
depengine-3.0.6 lib/depengine/helper/validations.rb
depengine-3.0.5 lib/depengine/helper/validations.rb
depengine-3.0.4 lib/depengine/helper/validations.rb
depengine-3.0.3 lib/depengine/helper/validations.rb
depengine-3.0.2 lib/depengine/helper/validations.rb