Sha256: 7fcb69af63de2c5c0e25ffe7864eae89713c6c4bfe30a87745a15493523a0d1c

Contents?: true

Size: 240 Bytes

Versions: 8

Compression:

Stored size: 240 Bytes

Contents

module Gratan::DSL::Validator
  def __validate(errmsg)
    raise __identify(errmsg) unless yield
  end

  def __identify(errmsg)
    if @error_identifier
      errmsg = "#{@error_identifier}: #{errmsg}"
    end

    return errmsg
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gratan-0.1.7 lib/gratan/dsl/validator.rb
gratan-0.1.6 lib/gratan/dsl/validator.rb
gratan-0.1.5 lib/gratan/dsl/validator.rb
gratan-0.1.4 lib/gratan/dsl/validator.rb
gratan-0.1.3 lib/gratan/dsl/validator.rb
gratan-0.1.2 lib/gratan/dsl/validator.rb
gratan-0.1.1 lib/gratan/dsl/validator.rb
gratan-0.1.0 lib/gratan/dsl/validator.rb