Sha256: 9a8ff1359583d7f763ae42c0bbf45b2abcb8b9b1e7c95d3435b0be79c287d684

Contents?: true

Size: 242 Bytes

Versions: 26

Compression:

Stored size: 242 Bytes

Contents

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

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

    return errmsg
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
gratan-0.3.2 lib/gratan/dsl/validator.rb
gratan-0.3.1 lib/gratan/dsl/validator.rb
gratan-0.3.1.beta4 lib/gratan/dsl/validator.rb
gratan-0.3.1.beta3 lib/gratan/dsl/validator.rb
gratan-0.3.1.beta2 lib/gratan/dsl/validator.rb
gratan-0.3.1.beta lib/gratan/dsl/validator.rb
gratan-0.3.0 lib/gratan/dsl/validator.rb
gratan-0.3.0.beta lib/gratan/dsl/validator.rb
gratan-0.2.9 lib/gratan/dsl/validator.rb
gratan-0.2.9.beta3 lib/gratan/dsl/validator.rb
gratan-0.2.9.beta2 lib/gratan/dsl/validator.rb
gratan-0.2.9.beta lib/gratan/dsl/validator.rb
gratan-0.2.8 lib/gratan/dsl/validator.rb
gratan-0.2.8.beta3 lib/gratan/dsl/validator.rb
gratan-0.2.8.beta2 lib/gratan/dsl/validator.rb
gratan-0.2.8.beta lib/gratan/dsl/validator.rb
gratan-0.2.7 lib/gratan/dsl/validator.rb
gratan-0.2.6 lib/gratan/dsl/validator.rb
gratan-0.2.5 lib/gratan/dsl/validator.rb
gratan-0.2.4 lib/gratan/dsl/validator.rb